¡@

Home 

c++ Programming Glossary: hostarray

How to separate CUDA code into multiple files

http://stackoverflow.com/questions/2090974/how-to-separate-cuda-code-into-multiple-files

#include MyKernel.cu int main int argc char argv int hostArray int deviceArray const int arrayLength 16 const unsigned int.. 16 const unsigned int memSize sizeof int arrayLength hostArray int malloc memSize cudaMalloc void deviceArray memSize std cout.. std cout Before device n for int i 0 i arrayLength i hostArray i i 1 std cout hostArray i n std cout n cudaMemcpy deviceArray..