Module: Cumo::CUDA::Runtime
- Defined in:
- ext/cumo/cuda/runtime.c
Class Method Summary collapse
- .cudaDeviceGetAttributes(attrib, device) ⇒ Object
- .cudaDeviceSynchronize ⇒ Object
- .cudaDriverGetVersion ⇒ Object
- .cudaGetDevice ⇒ Object
- .cudaGetDeviceCount ⇒ Object
- .cudaRuntimeGetVersion ⇒ Object
- .cudaSetDevice(device) ⇒ Object
Class Method Details
.cudaDeviceGetAttributes(attrib, device) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'ext/cumo/cuda/runtime.c', line 79
static VALUE
rb_cudaDeviceGetAttributes(VALUE self, VALUE attrib, VALUE device)
{
int _attrib = NUM2INT(attrib);
int _device = NUM2INT(device);
int _ret;
cudaError_t status;
status = cudaDeviceGetAttribute(&_ret, _attrib, _device);
check_status(status);
return INT2NUM(_ret);
}
|
.cudaDeviceSynchronize ⇒ Object
131 132 133 134 135 136 137 138 |
# File 'ext/cumo/cuda/runtime.c', line 131
static VALUE
rb_cudaDeviceSynchronize(VALUE self)
{
cudaError_t status;
status = cudaDeviceSynchronize();
check_status(status);
return Qnil;
}
|
.cudaDriverGetVersion ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'ext/cumo/cuda/runtime.c', line 23
static VALUE
rb_cudaDriverGetVersion(VALUE self)
{
int _version;
cudaError_t status;
status = cudaDriverGetVersion(&_version);
check_status(status);
return INT2NUM(_version);
}
|
.cudaGetDevice ⇒ Object
64 65 66 67 68 |
# File 'ext/cumo/cuda/runtime.c', line 64
static VALUE
rb_cudaGetDevice(VALUE self)
{
return INT2NUM(cumo_cuda_runtime_get_device());
}
|
.cudaGetDeviceCount ⇒ Object
100 101 102 103 104 |
# File 'ext/cumo/cuda/runtime.c', line 100
static VALUE
rb_cudaGetDeviceCount(VALUE self)
{
return INT2NUM(cumo_cuda_runtime_get_device_count());
}
|
.cudaRuntimeGetVersion ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'ext/cumo/cuda/runtime.c', line 41
static VALUE
rb_cudaRuntimeGetVersion(VALUE self)
{
int _version;
cudaError_t status;
status = cudaRuntimeGetVersion(&_version);
check_status(status);
return INT2NUM(_version);
}
|
.cudaSetDevice(device) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 |
# File 'ext/cumo/cuda/runtime.c', line 113
static VALUE
rb_cudaSetDevice(VALUE self, VALUE device)
{
int _device = NUM2INT(device);
cudaError_t status;
status = cudaSetDevice(_device);
check_status(status);
return Qnil;
}
|