user570593
user570593

Reputation: 3510

cuda surface memory error

My cuda code works fine. but when I include the following 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;
}

Upvotes: 1

Views: 796

Answers (2)

user570593
user570593

Reputation: 3510

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

Upvotes: 1

fabmilo
fabmilo

Reputation: 48310

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.

Upvotes: 0

Related Questions