Class: Torch::ByteStorage
- Inherits:
-
Object
- Object
- Torch::ByteStorage
- Defined in:
- lib/torch.rb
Overview
TODO move to C++
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
private.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bytes) ⇒ ByteStorage
constructor
A new instance of ByteStorage.
Constructor Details
#initialize(bytes) ⇒ ByteStorage
Returns a new instance of ByteStorage.
228 229 230 |
# File 'lib/torch.rb', line 228 def initialize(bytes) @bytes = bytes end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
private
226 227 228 |
# File 'lib/torch.rb', line 226 def bytes @bytes end |
Class Method Details
.from_buffer(bytes) ⇒ Object
232 233 234 |
# File 'lib/torch.rb', line 232 def self.from_buffer(bytes) new(bytes) end |