#include using namespace std; int main(void) { void* ptr = NULL; float* f = new float[1]; cudaMalloc(&ptr, sizeof(float)*1); int r = cudaMemcpy(ptr, f, sizeof(float) * 1, cudaMemcpyHostToDevice); cout << r << endl; cout << cudaSuccess << endl; cout << cudaErrorInvalidValue << endl; cout << cudaErrorInvalidDevicePointer << endl; cout << cudaErrorInvalidMemcpyDirection << endl; }