Class: Ignis::Memory::PinnedHostMemoryResource
- Inherits:
-
HostMemoryResource
- Object
- HostMemoryResource
- Ignis::Memory::PinnedHostMemoryResource
- Defined in:
- lib/nvruby/memory/pinned_host_memory_resource.rb
Overview
Pinned (page-locked) host memory resource Uses cudaHostAlloc for faster GPU transfers
Constant Summary collapse
- HOST_ALLOC_DEFAULT =
cudaHostAllocDefault flag
0x00- HOST_ALLOC_PORTABLE =
cudaHostAllocPortable flag
0x01- HOST_ALLOC_MAPPED =
cudaHostAllocMapped flag
0x02- HOST_ALLOC_WRITE_COMBINED =
cudaHostAllocWriteCombined flag
0x04
Constants inherited from HostMemoryResource
Instance Method Summary collapse
-
#initialize(flags: HOST_ALLOC_DEFAULT) ⇒ PinnedHostMemoryResource
constructor
A new instance of PinnedHostMemoryResource.
Methods inherited from HostMemoryResource
Constructor Details
#initialize(flags: HOST_ALLOC_DEFAULT) ⇒ PinnedHostMemoryResource
Returns a new instance of PinnedHostMemoryResource.
78 79 80 81 82 |
# File 'lib/nvruby/memory/pinned_host_memory_resource.rb', line 78 def initialize(flags: HOST_ALLOC_DEFAULT) super() @flags = flags CUDA::RuntimeAPI.ensure_loaded! end |