Files
rocm-systems/projects/hip/tests/src/runtimeApi/synchronization/memcpyInt.device.cpp
T
Ben Sander 50ef165727 Add copy_coherency test
Test cache managemenent and synchronization between kernel and copy commands
in separate queues.


[ROCm/hip commit: 54d5b52d05]
2017-10-07 07:54:10 -07:00

14 γραμμές
343 B
C++

#include <hip/hip_runtime.h>
extern "C" __global__ void
memcpyIntKernel(hipLaunchParm lp, int *dst, const int * src, size_t numElements)
{
int gid = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
int stride = hipBlockDim_x * hipGridDim_x ;
for (size_t i= gid; i< numElements; i+=stride){
dst[i] = src[i];
}
};