Sha256: fa6041c49b8660c3035bbcc9e169d191d3c516c54f8c6ea06ba54338c76b7166

Contents?: true

Size: 549 Bytes

Versions: 20

Compression:

Stored size: 549 Bytes

Contents

require_relative '../cuda'

module Cumo::CUDA
  # CUDA link state.
  class LinkState
    def initialize
      @ptr = Driver.cuLinkCreate
      if block_given?
        begin
          yield(self)
        ensure
          destroy
        end
      end
    end

    def destroy
      return unless @ptr
      Driver.cuLinkDestroy(@ptr)
      @ptr = nil
    end

    def add_ptr_data(data, name)
      Driver.cuLinkAddData(@ptr, Driver::CU_JIT_INPUT_PTX, data, name)
    end

    def complete
      cubin = Driver.cuLinkComplete(@ptr)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cumo-0.4.3 lib/cumo/cuda/link_state.rb
cumo-0.4.2 lib/cumo/cuda/link_state.rb
cumo-0.4.1 lib/cumo/cuda/link_state.rb
cumo-0.4.0 lib/cumo/cuda/link_state.rb
cumo-0.3.5 lib/cumo/cuda/link_state.rb
cumo-0.3.4 lib/cumo/cuda/link_state.rb
cumo-0.3.3 lib/cumo/cuda/link_state.rb
cumo-0.3.2 lib/cumo/cuda/link_state.rb
cumo-0.3.1 lib/cumo/cuda/link_state.rb
cumo-0.3.0 lib/cumo/cuda/link_state.rb
cumo-0.3.0.pre1 lib/cumo/cuda/link_state.rb
cumo-0.2.5 lib/cumo/cuda/link_state.rb
cumo-0.2.4 lib/cumo/cuda/link_state.rb
cumo-0.2.3 lib/cumo/cuda/link_state.rb
cumo-0.2.2 lib/cumo/cuda/link_state.rb
cumo-0.2.1 lib/cumo/cuda/link_state.rb
cumo-0.2.0 lib/cumo/cuda/link_state.rb
cumo-0.1.2 lib/cumo/cuda/link_state.rb
cumo-0.1.1 lib/cumo/cuda/link_state.rb
cumo-0.1.0 lib/cumo/cuda/link_state.rb