Class: Ignis::Memory::CudaMemoryResource
- Inherits:
-
DeviceMemoryResource
- Object
- DeviceMemoryResource
- Ignis::Memory::CudaMemoryResource
- Defined in:
- lib/nvruby/memory/cuda_memory_resource.rb
Overview
Simple memory resource using cudaMalloc/cudaFree This is the baseline allocator with no pooling
Constant Summary
Constants inherited from DeviceMemoryResource
DeviceMemoryResource::ALIGNMENT
Instance Attribute Summary
Attributes inherited from DeviceMemoryResource
Instance Method Summary collapse
-
#initialize(device_index: nil) ⇒ CudaMemoryResource
constructor
A new instance of CudaMemoryResource.
-
#supports_streams? ⇒ Boolean
False - synchronous allocation.
Methods inherited from DeviceMemoryResource
#allocate, #deallocate, #inspect, #is_equal?, #to_s
Constructor Details
#initialize(device_index: nil) ⇒ CudaMemoryResource
Returns a new instance of CudaMemoryResource.
11 12 13 14 |
# File 'lib/nvruby/memory/cuda_memory_resource.rb', line 11 def initialize(device_index: nil) super CUDA::RuntimeAPI.ensure_loaded! end |
Instance Method Details
#supports_streams? ⇒ Boolean
Returns false - synchronous allocation.
17 18 19 |
# File 'lib/nvruby/memory/cuda_memory_resource.rb', line 17 def supports_streams? false end |