开发者

cuda surface memory error

My cuda code works fine. but when I include the follo开发者_如何学编程wing on top of my code it gives some errors.

surface<void,2> sImg;

fatal   : Parsing error near '.surf': syntax error

How can I solve this?

When I declare "sImg" inside the main method it compiles..


The following doesnt work..

surface<void,2> sImg;

int main()
{
    return 0;
}


I changed Properties-->CUDA Runtime API-->GPU-->GPR Architecture1 to sm_20 Now it compiles..


Are you declaring it inside a .cu file where the kernel using the surface is declared ?

That statements needs to be parsed by the nvcc compiler to become effective.

If that does not work then post the error log of the compiler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜