eosCuda(API)
提供: Eospedia
General/eosCudaはCUDAを使用するためのAPI です。
定数
構造体
extern int __eosCuda__; extern int __eosCudaDeviceID__; extern int __eosCudaBlockSize__; extern int __eosCudaThreadsPerBlock__;
API
初期設定
extern void eosCudaInit(int deviceID);
プロパティをファイルfptへ出力します。
extern void eosCudaPropertiesPrint(FILE* fpt, int id);
下記の内容で出力します。
fprintf(fpt, "GPU Device %d: \"%s\" with compute capability %d.%d\n\n", __eosCudaDeviceID__, __eosCudaDeviceProp__.name, __eosCudaDeviceProp__.major, __eosCudaDeviceProp__.minor); fprintf(fpt, "totalGlobalMem: %d\n", __eosCudaDeviceProp__.totalGlobalMem); fprintf(fpt, "sharedMemPerBlock: %d\n", __eosCudaDeviceProp__.sharedMemPerBlock); fprintf(fpt, "maxThreadsPerBlock: %d\n", __eosCudaDeviceProp__.maxThreadsPerBlock);