Definition at line 41 of file CpuTensor.h.
Public Types | |
using | Matrix_t = TCpuMatrix< AFloat > |
using | MemoryLayout = TMVA::Experimental::MemoryLayout |
using | Scalar_t = AFloat |
using | Shape_t = typename TMVA::Experimental::RTensor< AFloat >::Shape_t |
Public Types inherited from TMVA::Experimental::RTensor< AFloat, TCpuBuffer< AFloat > > | |
using | Container_t = TCpuBuffer< AFloat > |
using | Index_t = Shape_t |
using | Shape_t = std::vector< std::size_t > |
using | Slice_t = std::vector< Shape_t > |
using | Value_t = AFloat |
Public Member Functions | |
TCpuTensor () | |
TCpuTensor (AFloat *data, const Shape_t &shape, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
TCpuTensor (const TCpuBuffer< AFloat > &buffer, Shape_t shape, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from a TCpuBuffer and a shape More... | |
TCpuTensor (const TCpuMatrix< AFloat > &matrix, size_t dim=3, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from a TCpuMatrix. More... | |
TCpuTensor (Shape_t shape, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from a shape. More... | |
TCpuTensor (size_t bsize, size_t depth, size_t height, size_t width, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from batch size, depth, height, width More... | |
TCpuTensor (size_t bsize, size_t depth, size_t hw, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from batch size, depth, height*width More... | |
TCpuTensor (size_t n, size_t m, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from n m More... | |
TCpuTensor< AFloat > | At (size_t i) |
TCpuTensor< AFloat > | At (size_t i) const |
size_t | GetBufferUseCount () const |
size_t | GetCSize () const |
TCpuBuffer< AFloat > & | GetDeviceBuffer () |
const TCpuBuffer< AFloat > & | GetDeviceBuffer () const |
size_t | GetFirstSize () const |
size_t | GetHSize () const |
MemoryLayout | GetLayout () const |
TCpuMatrix< AFloat > | GetMatrix () const |
size_t | GetNcols () const |
size_t | GetNoElements () const |
size_t | GetNrows () const |
AFloat * | GetRawDataPointer () |
Return raw pointer to the elements stored contiguously in column-major order. More... | |
const AFloat * | GetRawDataPointer () const |
size_t | GetWSize () const |
template<typename Function_t > | |
void | Map (Function_t &f) |
Map the given function over the matrix elements. More... | |
template<typename Function_t > | |
void | MapFrom (Function_t &f, const TCpuTensor< AFloat > &A) |
Same as maps but takes the input values from the tensor A and writes the results in this tensor. More... | |
operator TMatrixT< AFloat > () const | |
Convert to a TMatrixT<AFloat_t> object. More... | |
AFloat & | operator() (size_t i, size_t j) |
AFloat | operator() (size_t i, size_t j) const |
AFloat & | operator() (size_t i, size_t j, size_t k) |
AFloat | operator() (size_t i, size_t j, size_t k) const |
void | Print (const char *name="Tensor") const |
void | PrintShape (const char *name="Tensor") const |
TCpuTensor< AFloat > | Reshape (Shape_t shape) const |
void | Zero () |
Public Member Functions inherited from TMVA::Experimental::RTensor< AFloat, TCpuBuffer< AFloat > > | |
RTensor (Shape_t shape, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor owning data initialized with new container. More... | |
RTensor (std::shared_ptr< Container_t > container, Shape_t shape, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor owning externally provided data. More... | |
RTensor (Value_t *data, Shape_t shape, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor as view on data. More... | |
RTensor (Value_t *data, Shape_t shape, Shape_t strides, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor as view on data. More... | |
Iterator | begin () noexcept |
RTensor< Value_t, Container_t > | Copy (MemoryLayout layout=MemoryLayout::RowMajor) |
Copy RTensor to new object. More... | |
Iterator | end () noexcept |
RTensor< Value_t, Container_t > | ExpandDims (int idx) |
Expand dimensions. More... | |
std::shared_ptr< Container_t > | GetContainer () |
const std::shared_ptr< Container_t > | GetContainer () const |
Value_t * | GetData () |
const Value_t * | GetData () const |
MemoryLayout | GetMemoryLayout () const |
const Shape_t & | GetShape () const |
std::size_t | GetSize () const |
const Shape_t & | GetStrides () const |
bool | IsOwner () const |
bool | IsView () const |
Value_t & | operator() (const Index_t &idx) |
Access elements. More... | |
const Value_t & | operator() (const Index_t &idx) const |
Access elements. More... | |
Value_t & | operator() (Idx... idx) |
Access elements. More... | |
const Value_t & | operator() (Idx... idx) const |
Access elements. More... | |
RTensor< Value_t, Container_t > | Reshape (const Shape_t &shape) |
Reshape tensor. More... | |
RTensor< Value_t, Container_t > | Slice (const Slice_t &slice) |
Create a slice of the tensor. More... | |
RTensor< Value_t, Container_t > | Squeeze () |
Squeeze dimensions. More... | |
RTensor< Value_t, Container_t > | Transpose () |
Transpose. More... | |
Friends | |
class | TCpuMatrix< AFloat > |
Additional Inherited Members | |
Protected Member Functions inherited from TMVA::Experimental::RTensor< AFloat, TCpuBuffer< AFloat > > | |
void | ReshapeInplace (const Shape_t &shape) |
Reshape tensor in place. More... | |
#include <TMVA/DNN/Architectures/Cpu/CpuTensor.h>
using TMVA::DNN::TCpuTensor< AFloat >::Matrix_t = TCpuMatrix<AFloat> |
Definition at line 50 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::MemoryLayout = TMVA::Experimental::MemoryLayout |
Definition at line 49 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::Scalar_t = AFloat |
Definition at line 51 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::Shape_t = typename TMVA::Experimental::RTensor<AFloat>::Shape_t |
Definition at line 48 of file CpuTensor.h.
|
inline |
Definition at line 54 of file CpuTensor.h.
|
inline |
constructors from n m
Definition at line 58 of file CpuTensor.h.
|
inline |
constructors from batch size, depth, height*width
Definition at line 63 of file CpuTensor.h.
|
inline |
constructors from batch size, depth, height, width
Definition at line 71 of file CpuTensor.h.
|
inline |
constructors from a shape.
Definition at line 81 of file CpuTensor.h.
|
inline |
Definition at line 88 of file CpuTensor.h.
|
inline |
constructors from a TCpuBuffer and a shape
Definition at line 100 of file CpuTensor.h.
|
inline |
constructors from a TCpuMatrix.
Memory layout is forced to be same as matrix (i.e. columnlayout)
Definition at line 109 of file CpuTensor.h.
|
inline |
Definition at line 222 of file CpuTensor.h.
|
inline |
Definition at line 235 of file CpuTensor.h.
|
inline |
Definition at line 295 of file CpuTensor.h.
|
inline |
Definition at line 162 of file CpuTensor.h.
|
inline |
Definition at line 147 of file CpuTensor.h.
|
inline |
Definition at line 146 of file CpuTensor.h.
|
inline |
Definition at line 156 of file CpuTensor.h.
|
inline |
Definition at line 169 of file CpuTensor.h.
|
inline |
Definition at line 195 of file CpuTensor.h.
|
inline |
Definition at line 198 of file CpuTensor.h.
|
inline |
Definition at line 192 of file CpuTensor.h.
|
inline |
Definition at line 150 of file CpuTensor.h.
|
inline |
Definition at line 191 of file CpuTensor.h.
|
inline |
Return raw pointer to the elements stored contiguously in column-major order.
Definition at line 142 of file CpuTensor.h.
|
inline |
Definition at line 143 of file CpuTensor.h.
|
inline |
Definition at line 178 of file CpuTensor.h.
|
inline |
Map the given function over the matrix elements.
Executed in parallel using TThreadExecutor.
Definition at line 320 of file CpuTensor.h.
|
inline |
Same as maps but takes the input values from the tensor A
and writes the results in this tensor.
Definition at line 349 of file CpuTensor.h.
|
inline |
Convert to a TMatrixT<AFloat_t> object.
Performs a deep copy of the matrix elements.
Definition at line 129 of file CpuTensor.h.
|
inline |
Definition at line 246 of file CpuTensor.h.
|
inline |
Definition at line 267 of file CpuTensor.h.
|
inline |
Definition at line 256 of file CpuTensor.h.
|
inline |
Definition at line 275 of file CpuTensor.h.
|
inline |
Definition at line 297 of file CpuTensor.h.
|
inline |
Definition at line 305 of file CpuTensor.h.
|
inline |
Definition at line 213 of file CpuTensor.h.
|
inline |
Definition at line 238 of file CpuTensor.h.
|
friend |
Definition at line 349 of file CpuTensor.h.