问题
在使用cuda的纹理存储器时,编译器报错
1 2 3 4 |
|
解决方法
经过研究,发现原来cuda的纹理存储器不能直接支持double
The type of a texel, which is restricted to the basic integer and single-precision floating-point types and any of the 1-, 2-, and 4-component vector types defined in char, short, int, long, longlong, float, double that are derived from the basic integer and single-precision floating-point types. 出处:cuda-c-programming-guide
非要加速的话,可以使用一个int2类型的向量拼接成一个double
1 2 3 4 5 6 7 |
|