Open cqray1990 opened 2 years ago
That code compiled just fine on my machine. Note that the markdown "swallowed" some underscores and backslashes, i added those back (in case that's what the problem is). In particular the LINE
should be __LINE__
, and the macro should have backslashes (\
) at the end; but other than that the sample compiled just fine (ubuntu 20.04). What error(s) were you seeing?
/**
include
include
include
include
static const int WORK_SIZE = 256;
/**
define CHECK_CUDA_RESULT(N) { \
CUresult result = N; \ if (result != 0) { \ printf("CUDA call on line %d returned error %d\n", LINE, \ result); \ exit(1); \ } }
int main(int argc, char **argv) { CUmodule module; CUcontext context; CUdevice device; CUdeviceptr deviceArray; CUfunction process;
}