Hello,
I have been having a heck of a time setting up CUDA to compile on VS 2010. So far I have checked CUDA 4.2 in the build configurations and written a few short functions to test.
In the kernel.cu file I have:
[font=“Arial Black”]#include “kernel.h”
#include <cuda.h>
#include <cuda_runtime_api.h> // includes cuda.h and cuda_runtime_api.h
device int kernel(void){
return 5;
}
int call(){
return kernel<<<1,1>>>();
}[/font]
In kernel.h, I have:
[font=“Arial Black”]#ifndef KERNEL_h
#define KERNEL_h
int call();
#endif[/font]
And in main.c, I have:
[font=“Arial Black”]#include “kernel.h”
#include <cuda.h>
#include <cuda_runtime_api.h>
int main() {
call();
}[/font]
The problem is that the triple brackets register errors even in the .cu file. Also, cudaMalloc is not recognized in call(). Is there anything I need to do besides the build configurations to get this to work? Thank you.