Loading...
Searching...
No Matches
tensor_utilities.h File Reference
Go to the source code of this file.
Classes | |
| struct | opennn::Shape |
| Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank). More... | |
| struct | opennn::TensorSpec |
| Lightweight description of a tensor's shape and data type (no storage attached). More... | |
| struct | opennn::Buffer |
| Owning raw byte buffer that lives on CPU or CUDA memory, with aligned (re)allocation. More... | |
| struct | opennn::TensorView |
| Non-owning view over a tensor: pointer, shape, and data type with rich reshape helpers. More... | |
| class | opennn::Backend |
| Process-wide singleton that owns the thread pool and the cuBLAS/cuDNN handles. More... | |
Namespaces | |
| namespace | opennn |
Typedefs | |
| template<typename T, size_t N> | |
| using | opennn::array = Eigen::array<T, N> |
Functions | |
| int | opennn::to_int (Index value) |
| float | opennn::to_type (Index value) |
| Index | opennn::align_up (Index value, Index alignment) |
| Index | opennn::get_aligned_size (Index size) |
| Index | opennn::get_aligned_bytes (Index n_bytes) |
| Index | opennn::get_aligned_bytes (Index count, Type dtype) |
| bool | opennn::is_aligned (const void *ptr) |
| Index | opennn::get_aligned_size (const vector< TensorSpec > &specs) |
| Index | opennn::get_aligned_size (const vector< vector< TensorSpec > > &specs) |
| Index | opennn::get_aligned_bytes (const vector< TensorSpec > &specs) |
| Index | opennn::get_aligned_bytes (const vector< vector< TensorSpec > > &specs) |
| Index | opennn::get_aligned_bytes (const vector< Shape > &shapes, Type dtype) |
| Index | opennn::get_aligned_bytes (const vector< TensorSpec > &specs, Type dtype) |
| Index | opennn::get_aligned_bytes (const vector< vector< TensorSpec > > &specs, Type dtype) |
| TensorView & | opennn::view_at_slot_or (vector< TensorView > &views, const vector< size_t > &slots, size_t i, TensorView &fallback) |
| TensorView & | opennn::view_at_slot_or (vector< vector< TensorView > > &views, const vector< size_t > &slots, size_t i, TensorView &fallback) |
| string | opennn::shape_to_string (const Shape &, const string &=" ") |
| Serializes a shape as a separator-joined string of dimensions. | |
| Shape | opennn::string_to_shape (const string &, const string &=" ") |
| Parses a separator-joined string of dimensions into a Shape. | |
| template<typename... Vs> | |
| size_t | opennn::hash_combine (const Vs &... values) |
| Boost-style hash combine that mixes any number of hashable values into a single size_t. | |
| ThreadPoolDevice & | opennn::get_device () |
| Convenience accessor for the global Eigen ThreadPoolDevice. | |
Variables | |
| static constexpr Index | opennn::ALIGN_BYTES = EIGEN_MAX_ALIGN_BYTES |
| static constexpr Index | opennn::ALIGN_ELEMENTS = ALIGN_BYTES / sizeof(float) |
| constexpr cudaDataType_t | opennn::CUDA_REDUCTION_DTYPE = CUDA_R_32F |
| constexpr cublasComputeType_t | opennn::CUBLAS_COMPUTE_DTYPE = CUBLAS_COMPUTE_32F_FAST_TF32 |