CUDA学习(四十二)

Surface Reference API(表面参考API):
surf1Dread():

template<class Type>
Type surf1Dread(surface<void, cudaSurfaceType1D> surfRef,
    int x,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surf1Dread(Type data,
    surface<void, cudaSurfaceType1D> surfRef,
    int x,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x读取绑定到一维曲面参考surfRef的CUDA数组。
surf1Dwrite():

template<class Type>
void surf1Dwrite(Type data,
    surface<void, cudaSurfaceType1D> surfRef,
    int x,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到坐标x处的一维表面参考surfRef的CUDA数组。
surf2Dread():

template<class Type>
Type surf2Dread(surface<void, cudaSurfaceType2D> surfRef,
    int x, int y,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surf2Dread(Type* data,
    surface<void, cudaSurfaceType2D> surfRef,
    int x, int y,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x和y读取绑定到二维曲面参考surfRef的CUDA数组。
surf2Dwrite():

template<class Type>
void surf3Dwrite(Type data,
    surface<void, cudaSurfaceType3D> surfRef,
    int x, int y, int z,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到二维表面参考surfRef的坐标x和y处的CUDA数组。
surf3Dread():

template<class Type>
Type surf3Dread(surface<void, cudaSurfaceType3D> surfRef,
    int x, int y, int z,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surf3Dread(Type* data,
    surface<void, cudaSurfaceType3D> surfRef,
    int x, int y, int z,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x,y和z读取绑定到三维曲面参考surfRef的CUDA数组。
surf3Dwrite():

template<class Type>
void surf3Dwrite(Type data,
    surface<void, cudaSurfaceType3D> surfRef,
    int x, int y, int z,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到坐标x,y和z的三维表面参考surfRef的CUDA数组。
surf1DLayeredread():

template<class Type>
Type surf1DLayeredread(
    surface<void, cudaSurfaceType1DLayered> surfRef,
    int x, int layer,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surf1DLayeredread(Type data,
    surface<void, cudaSurfaceType1DLayered> surfRef,
    int x, int layer,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x和索引层读取绑定到一维分层表面参考surfRef的CUDA数组。
surf1DLayeredwrite():

template<class Type>
void surf1DLayeredwrite(Type data,
    surface<void, cudaSurfaceType1DLayered> surfRef,
    int x, int layer,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到坐标x和索引层的二维分层表面参考surfRef的CUDA数组。
surf2DLayeredread():

template<class Type>
Type surf2DLayeredread(
    surface<void, cudaSurfaceType2DLayered> surfRef,
    int x, int y, int layer,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surf2DLayeredread(Type data,
    surface<void, cudaSurfaceType2DLayered> surfRef,
    int x, int y, int layer,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x和y以及索引层读取绑定到二维分层表面参考surfRef的CUDA数组。
surf2DLayeredwrite():

template<class Type>
void surf2DLayeredwrite(Type data,
    surface<void, cudaSurfaceType2DLayered> surfRef,
    int x, int y, int layer,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到一维分层表面参考surfRef的坐标x和y处的CUDA数组,以及索引层。
surfCubemapread():

template<class Type>
Type surfCubemapread(
    surface<void, cudaSurfaceTypeCubemap> surfRef,
    int x, int y, int face,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surfCubemapread(Type data,
    surface<void, cudaSurfaceTypeCubemap> surfRef,
    int x, int y, int face,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x和y读取绑定到立方体贴图表面参考surfRef的CUDA数组,并使用面对索引面。
surfCubemapwrite():

template<class Type>
void surfCubemapwrite(Type data,
    surface<void, cudaSurfaceTypeCubemap> surfRef,
    int x, int y, int face,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到坐标x和y处的立方体贴图参考surfRef的CUDA数组,并且面对索引面。
surfCubemapLayeredread():

template<class Type>
Type surfCubemapLayeredread(
    surface<void, cudaSurfaceTypeCubemapLayered> surfRef,
    int x, int y, int layerFace,
    boundaryMode = cudaBoundaryModeTrap);
template<class Type>
void surfCubemapLayeredread(Type data,
    surface<void, cudaSurfaceTypeCubemapLayered> surfRef,
    int x, int y, int layerFace,
    boundaryMode = cudaBoundaryModeTrap);

使用坐标x和y以及索引layerFace读取绑定到立方体贴图分层曲面参考surfRef的CUDA数组。
surfCubemapLayeredwrite():

template<class Type>
void surfCubemapLayeredwrite(Type data,
    surface<void, cudaSurfaceTypeCubemapLayered> surfRef,
    int x, int y, int layerFace,
    boundaryMode = cudaBoundaryModeTrap);

将值数据写入绑定到cubemap分层参考surfRef的坐标x和y处的CUDA数组,以及index layerFace。
timg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值