Class: TensorStream::Buffer

Inherits:
Object
  • Object
show all
Defined in:
lib/tensor_stream/evaluator/buffer.rb

Overview

this class represents an evaluator specific native buffer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_type:, buffer:) ⇒ Buffer

Returns a new instance of Buffer.



6
7
8
9
# File 'lib/tensor_stream/evaluator/buffer.rb', line 6

def initialize(data_type:, buffer:)
  @data_type = data_type
  @buffer = buffer
end

Instance Attribute Details

#bufferObject

Returns the value of attribute buffer.



4
5
6
# File 'lib/tensor_stream/evaluator/buffer.rb', line 4

def buffer
  @buffer
end

#data_typeObject

Returns the value of attribute data_type.



4
5
6
# File 'lib/tensor_stream/evaluator/buffer.rb', line 4

def data_type
  @data_type
end

#dirtyObject

Returns the value of attribute dirty.



4
5
6
# File 'lib/tensor_stream/evaluator/buffer.rb', line 4

def dirty
  @dirty
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/tensor_stream/evaluator/buffer.rb', line 4

def name
  @name
end

Instance Method Details

#to_rubyObject



11
12
13
# File 'lib/tensor_stream/evaluator/buffer.rb', line 11

def to_ruby
  buffer
end