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
108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'ext/cumo/cuda/runtime.c', line 108
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
160 161 162 163 164 165 166 167 |
# File 'ext/cumo/cuda/runtime.c', line 160
static VALUE
rb_cudaDeviceSynchronize(VALUE self)
{
cudaError_t status;
status = cudaDeviceSynchronize();
check_status(status);
return Qnil;
}
|
.cudaDriverGetVersion ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'ext/cumo/cuda/runtime.c', line 52
static VALUE
rb_cudaDriverGetVersion(VALUE self)
{
int _version;
cudaError_t status;
status = cudaDriverGetVersion(&_version);
check_status(status);
return INT2NUM(_version);
}
|
.cudaGetDevice ⇒ Object
93 94 95 96 97 |
# File 'ext/cumo/cuda/runtime.c', line 93
static VALUE
rb_cudaGetDevice(VALUE self)
{
return INT2NUM(cumo_cuda_runtime_get_device());
}
|
.cudaGetDeviceCount ⇒ Object
129 130 131 132 133 |
# File 'ext/cumo/cuda/runtime.c', line 129
static VALUE
rb_cudaGetDeviceCount(VALUE self)
{
return INT2NUM(cumo_cuda_runtime_get_device_count());
}
|
.cudaRuntimeGetVersion ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'ext/cumo/cuda/runtime.c', line 70
static VALUE
rb_cudaRuntimeGetVersion(VALUE self)
{
int _version;
cudaError_t status;
status = cudaRuntimeGetVersion(&_version);
check_status(status);
return INT2NUM(_version);
}
|
.cudaSetDevice(device) ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 |
# File 'ext/cumo/cuda/runtime.c', line 142
static VALUE
rb_cudaSetDevice(VALUE self, VALUE device)
{
int _device = NUM2INT(device);
cudaError_t status;
status = cudaSetDevice(_device);
check_status(status);
return Qnil;
}
|