Skip to content
Snippets Groups Projects
Commit 065b30d0 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Adding cudaMemcpy on CPU

parent 46fb5aec
No related branches found
No related tags found
No related merge requests found
Pipeline #4063 passed
......@@ -140,8 +140,6 @@ enum cudaError
typedef cudaError cudaError_t;
struct uint3
{
unsigned int x, y, z;
......@@ -209,6 +207,43 @@ static cudaError cudaMemcpyToSymbol(unsigned char * global_cuda_error_array, con
return cudaError::cudaSuccess;
}
//static cudaError cudaMemcpy( void* dst, const void* src, size_t count, cudaMemcpyKind kind)
//{
// we copy with OpenMP (when available) the reason stay in avoiding NUMA across threads
// (in multi-socket environment)
/* {
char * dst_ = (char *)dst;
char * src_ = (char *)src;
for (int i = 0 ; i < count % 8 ; i++)
{
dst_[i] = src_[i];
}
}
{
double * dst_ = (double *)(((char *)dst) + count % 8);
double * src_ = (double *)(((char *)src) + count % 8);
count /= 8;
#pragma omp parallel for
for (int i = 0 ; i < count ; i++)
{
dst_[i] = src_[i];
}
}*/
// memcpy(dst,src,count);
// return cudaError::cudaSuccess;
//}
/*static cudaError cudaHostGetDevicePointer( void** pDevice, void* pHost, unsigned int flags)
{
*pDevice = pHost;
return cudaError::cudaSuccess;
}*/
struct float3
{
float x,y,z;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment