File size: 1,431 Bytes
7c90483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Minimal libcuda.so.1 stand-in so the CUDA build of audio.cpp can start on a
   machine without an NVIDIA driver. Every call reports "no CUDA device". */
typedef int CUresult;
#define NO_DEVICE 100
CUresult cuDeviceGet(void *d, int o){return NO_DEVICE;}
CUresult cuDeviceGetAttribute(int *p, int a, int d){return NO_DEVICE;}
CUresult cuGetErrorString(CUresult e, const char **s){ if(s) *s="CUDA driver not available (CPU mode)"; return 0;}
CUresult cuMemAddressFree(unsigned long long p, unsigned long s){return NO_DEVICE;}
CUresult cuMemAddressReserve(void *p, unsigned long s, unsigned long a, unsigned long long b, unsigned long long f){return NO_DEVICE;}
CUresult cuMemCreate(void *h, unsigned long s, const void *p, unsigned long long f){return NO_DEVICE;}
CUresult cuMemGetAllocationGranularity(unsigned long *g, const void *p, int o){return NO_DEVICE;}
CUresult cuMemMap(unsigned long long p, unsigned long s, unsigned long o, unsigned long long h, unsigned long long f){return NO_DEVICE;}
CUresult cuMemRelease(unsigned long long h){return NO_DEVICE;}
CUresult cuMemSetAccess(unsigned long long p, unsigned long s, const void *d, unsigned long c){return NO_DEVICE;}
CUresult cuMemUnmap(unsigned long long p, unsigned long s){return NO_DEVICE;}
CUresult cuInit(unsigned int f){return NO_DEVICE;}
CUresult cuDriverGetVersion(int *v){ if(v) *v=0; return NO_DEVICE;}
CUresult cuDeviceGetCount(int *c){ if(c) *c=0; return 0;}