Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 0 additions & 138 deletions applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include <cuda_gl_interop.h>
#include <iostream>


//#define NO_CUDA

cudaDeviceProp mycudaDeviceProp;


Expand All @@ -43,139 +40,6 @@ namespace cuda
{
#endif

#ifdef NO_CUDA

bool cudaCheck(cudaError_t, const char*)
{
return true;
}

bool cudaInitCalled = false;

int mycudaInit(int)
{
cudaInitCalled = true;
return 0;
}

void mycudaMalloc(void **devPtr, size_t,int )
{
*devPtr = NULL;
}

void mycudaMallocPitch(void **devPtr, size_t*, size_t, size_t)
{
*devPtr = NULL;
}

void mycudaFree(void *, int)
{
}

void mycudaMallocHost(void **hostPtr, size_t size)
{
*hostPtr = malloc(size);
}

void mycudaFreeHost(void *hostPtr)
{
free(hostPtr);
}

void mycudaMemcpyHostToDevice(void *, const void *, size_t, int)
{
}

void mycudaMemcpyDeviceToDevice(void *, const void *, size_t,int )
{
}

void mycudaMemcpyDeviceToHost(void *, const void *, size_t,int )
{
}

void mycudaMemcpyHostToDevice2D(void *, size_t, const void *, size_t, size_t, size_t)
{
}

void mycudaMemcpyDeviceToDevice2D(void *, size_t, const void *, size_t, size_t, size_t )
{
}

void mycudaMemcpyDeviceToHost2D(void *, size_t, const void *, size_t, size_t, size_t)
{
}

void mycudaGLRegisterBufferObject(int)
{
}

void mycudaGLUnregisterBufferObject(int)
{
}

void mycudaGLMapBufferObject(void** ptr, int)
{
*ptr = NULL;
}

void mycudaGLUnmapBufferObject(int)
{
}

int mycudaGetnumDevices()
{
return 0;
}

int mycudaGetBufferDevice()
{
return 0;
}

void mycudaMemset(void *devPtr, int val, size_t size,int )
{
}

void cuda_void_kernel()
{
}

#ifdef SOFA_GPU_CUBLAS
cusparseHandle_t getCusparseCtx()
{
return NULL;
}

cublasHandle_t getCublasCtx()
{
return NULL;
}

cusparseMatDescr_t getCusparseMatGeneralDescr()
{
return NULL;
}

cusparseMatDescr_t getCusparseMatTriangularLowerDescr()
{
return NULL;
}

cusparseMatDescr_t getCusparseMatTriangularUpperDescr()
{
return NULL;
}


void SOFA_GPU_CUDA_API mycudaMemGetInfo(size_t * free,size_t * total) {

}

#endif //SOFA_GPU_CUBLAS

#else

extern "C"
{
int SOFA_GPU_CUDA_API mycudaGetMultiProcessorCount();
Expand Down Expand Up @@ -513,8 +377,6 @@ void SOFA_GPU_CUDA_API mycudaMemGetInfo(size_t * free,size_t * total) {

#endif //SOFA_GPU_CUBLAS

#endif

#if defined(__cplusplus)
} // namespace cuda
} // namespace gpu
Expand Down
Loading