Sha256: af615febdab074803236df7e40b63a47473512ed81cc979890df5f0f1848a68c
Contents?: true
Size: 639 Bytes
Versions: 20
Compression:
Stored size: 639 Bytes
Contents
require_relative '../cuda' module Cumo::CUDA # CUDA kernel module. class Module def initialize @ptr = nil if block_given? begin yield(self) ensure unload end end end def unload return unless @ptr Driver.cuModuleUnload(@ptr) @ptr = nil end def load_file(fname) @ptr = Driver.cuModuleLoad(fname) end def load(cubin) @ptr = Driver.cuModuleLoadData(cubin) end def get_global_var(name) Driver.cuModuleGetGlobal(@ptr, name) end def get_function(name) # Function(name) end end end
Version data entries
20 entries across 20 versions & 1 rubygems