Skip to content

Instantly share code, notes, and snippets.

@edgarriba
Last active November 8, 2016 17:10
Show Gist options
  • Save edgarriba/66f7cfd43699ebb0010a59dd65864f0d to your computer and use it in GitHub Desktop.
Save edgarriba/66f7cfd43699ebb0010a59dd65864f0d to your computer and use it in GitHub Desktop.
@startuml
class Tensor {
+ Tensor(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth)
+ shape(): int[]
+ operator [](cnn_size_t index) : float_t&
+ operator [](cnn_size_t index) const : const float_t&
+ at(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) : float_t&
+ at(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) const : const float_t&
+ ptr(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) : float_t&*
+ ptr(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) const : const float_t*
+ toDevice(const Device& device) : void
- init_data(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) : void
- init_shape(cnn_size_t batch, cnn_size_t width, cnn_size_t height, cnn_size_t depth) : void
- int[] shape
- unique_ptr<float_t[]> data_cpu
- shared_ptr<CLCudaAPI::Buffer<float_t[]>> data_gpu
}
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment