Definition at line 40 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 | |
TCpuTensor (const TCpuMatrix< AFloat > &matrix, size_t dim=3, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from a TCpuMatrix. | |
TCpuTensor (Shape_t shape, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from a shape. | |
TCpuTensor (size_t bsize, size_t depth, size_t height, size_t width, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from batch size, depth, height, width | |
TCpuTensor (size_t bsize, size_t depth, size_t hw, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from batch size, depth, height*width | |
TCpuTensor (size_t n, size_t m, MemoryLayout memlayout=MemoryLayout::ColumnMajor) | |
constructors from n m | |
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. | |
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. | |
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. | |
operator TMatrixT () const | |
Convert to a TMatrixT<AFloat_t> object. | |
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 |
TCpuMatrix< AFloat > | operator[] (size_t i) 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. | |
RTensor (std::shared_ptr< Container_t > container, Shape_t shape, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor owning externally provided data. | |
RTensor (Value_t *data, Shape_t shape, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor as view on data. | |
RTensor (Value_t *data, Shape_t shape, Shape_t strides, MemoryLayout layout=MemoryLayout::RowMajor) | |
Construct a tensor as view on data. | |
Iterator | begin () noexcept |
RTensor< Value_t, Container_t > | Copy (MemoryLayout layout=MemoryLayout::RowMajor) const |
Copy RTensor to new object. | |
Iterator | end () noexcept |
RTensor< Value_t, Container_t > | ExpandDims (int idx) const |
Expand dimensions. | |
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. | |
const Value_t & | operator() (const Index_t &idx) const |
Access elements. | |
Value_t & | operator() (Idx... idx) |
Access elements. | |
const Value_t & | operator() (Idx... idx) const |
Access elements. | |
RTensor< Value_t, Container_t > | Reshape (const Shape_t &shape) const |
Reshape tensor. | |
RTensor< Value_t, Container_t > | Resize (const Shape_t &shape) |
Resize tensor. | |
RTensor< Value_t, Container_t > | Slice (const Slice_t &slice) |
Create a slice of the tensor. | |
RTensor< Value_t, Container_t > | Squeeze () const |
Squeeze dimensions. | |
RTensor< Value_t, Container_t > | Transpose () const |
Transpose. | |
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. | |
#include <TMVA/DNN/Architectures/Cpu/CpuTensor.h>
using TMVA::DNN::TCpuTensor< AFloat >::Matrix_t = TCpuMatrix<AFloat> |
Definition at line 49 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::MemoryLayout = TMVA::Experimental::MemoryLayout |
Definition at line 48 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::Scalar_t = AFloat |
Definition at line 50 of file CpuTensor.h.
using TMVA::DNN::TCpuTensor< AFloat >::Shape_t = typename TMVA::Experimental::RTensor<AFloat>::Shape_t |
Definition at line 47 of file CpuTensor.h.
|
inline |
Definition at line 53 of file CpuTensor.h.
|
inline |
constructors from n m
Definition at line 57 of file CpuTensor.h.
|
inline |
constructors from batch size, depth, height*width
Definition at line 62 of file CpuTensor.h.
|
inline |
constructors from batch size, depth, height, width
Definition at line 70 of file CpuTensor.h.
|
inline |
constructors from a shape.
Definition at line 80 of file CpuTensor.h.
|
inline |
Definition at line 87 of file CpuTensor.h.
|
inline |
constructors from a TCpuBuffer and a shape
Definition at line 99 of file CpuTensor.h.
|
inline |
constructors from a TCpuMatrix.
Memory layout is forced to be same as matrix (i.e. columnlayout)
Definition at line 108 of file CpuTensor.h.
|
inline |
Definition at line 221 of file CpuTensor.h.
|
inline |
Definition at line 234 of file CpuTensor.h.
|
inline |
Definition at line 300 of file CpuTensor.h.
|
inline |
Definition at line 161 of file CpuTensor.h.
|
inline |
Definition at line 146 of file CpuTensor.h.
|
inline |
Definition at line 145 of file CpuTensor.h.
|
inline |
Definition at line 155 of file CpuTensor.h.
|
inline |
Definition at line 168 of file CpuTensor.h.
|
inline |
Definition at line 194 of file CpuTensor.h.
|
inline |
Definition at line 197 of file CpuTensor.h.
|
inline |
Definition at line 191 of file CpuTensor.h.
|
inline |
Definition at line 149 of file CpuTensor.h.
|
inline |
Definition at line 190 of file CpuTensor.h.
|
inline |
Return raw pointer to the elements stored contiguously in column-major order.
Definition at line 141 of file CpuTensor.h.
|
inline |
Definition at line 142 of file CpuTensor.h.
|
inline |
Definition at line 177 of file CpuTensor.h.
|
inline |
Map the given function over the matrix elements.
Executed in parallel using TThreadExecutor.
Definition at line 325 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 354 of file CpuTensor.h.
|
inline |
Convert to a TMatrixT<AFloat_t> object.
Performs a deep copy of the matrix elements.
Definition at line 128 of file CpuTensor.h.
|
inline |
Definition at line 251 of file CpuTensor.h.
|
inline |
Definition at line 272 of file CpuTensor.h.
|
inline |
Definition at line 261 of file CpuTensor.h.
|
inline |
Definition at line 280 of file CpuTensor.h.
|
inline |
Definition at line 237 of file CpuTensor.h.
|
inline |
Definition at line 302 of file CpuTensor.h.
|
inline |
Definition at line 310 of file CpuTensor.h.
|
inline |
Definition at line 212 of file CpuTensor.h.
|
inline |
Definition at line 243 of file CpuTensor.h.
|
friend |
Definition at line 354 of file CpuTensor.h.