A tensor plus its reference to its parent tensor. More...
#include <TTL_tensors.h>
Data Structures | |
struct | Origin |
Public Member Functions | |
TTL_sub_tensor (TENSORTYPE *base, const TTL_shape &shape, const TTL_layout &layout, const TTL_dim elem_size, const TTL_offset offset, const TTL_shape origin_shape, TTL_offset origin_offset) | |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _7_params) | |
TTL_sub_tensor (TENSORTYPE *const base, const TTL_shape &shape, const TTL_layout &layout, const TTL_tensor< TENSORTYPE > &origin_tensor, const TTL_offset &sub_offset) | |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _5_params) | |
TTL_sub_tensor (TENSORTYPE const base, const TTL_tensor< TENSORTYPE > &origin_tensor) | |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _2_params) | |
TTL_sub_tensor (const TTL_tensor< TENSORTYPE > &origin_tensor) | |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _1_param) | |
TTL_sub_tensor () | |
Create an empty tiled internal tensor. Empty means it has all dimensions set to zero. | |
const TENSORTYPE & | read (const unsigned int x, const unsigned int y=0, const unsigned int z=0) const |
Read a value from a sub_tensor. | |
TENSORTYPE | write (const TENSORTYPE value, const unsigned int x, const unsigned int y=0, const unsigned int z=0) |
Write a value to a sub_tensor. | |
bool | empty () |
A Tensor is empty if its shape is empty. | |
Data Fields | |
TTL_tensor< TENSORTYPE > | tensor |
Origin | origin |
A tensor plus its reference to its parent tensor.
TTL_sub_tensor contains both the logical dimensions of a tile as well as its physical mapping to memory.
TTL_scope | The scope of the creation can be TTL_global or TTL_local |
const_1 | The const name to place after the prefix - should be empty or const_ |
location | The location of the tensor - should be ext or int |
type | The type of the tensor - should be any valid c type |
const_2 | The const type to create - should be empty or const |
Definition at line 275 of file TTL_cpp/TTL_tensors.h.
|
inline |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _7_params)
base | The ## TTL_scope ## base address of the tensor in ## location ## memory |
shape | Description of the shape of the tensor that base points |
layout | The layout of the ## location ## tensor |
elem_size | The size of a single element in the |
offset | The offset of the tensor from the base. |
origin_shape | The shape of the tensor that originated the sub tensor |
origin_offset | The offset of the tensor from the souce tensor. |
Definition at line 289 of file TTL_cpp/TTL_tensors.h.
|
inline |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _5_params)
base | The ## TTL_scope ## base address of the tensor in ## location ## memory |
shape | Description of the shape of the tensor that base points |
layout | The layout of the ## location ## tensor |
origin_tensor | The tensor that originated the sub tensor |
sub_offset | The offset of the tensor from the souce tensor. |
The element size of the tensor is taken from the origin tensor The offset of the sub tensor is taken to be (0, 0, 0)
Definition at line 308 of file TTL_cpp/TTL_tensors.h.
|
inline |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _2_params)
Simply create a sub_tensor from an origin tensor
base | The ## TTL_scope ## base address of the tensor in ## location ## memory |
origin_tensor | The tensor that originated the sub tensor |
The element size of the tensor is taken from the origin tensor The offset of the sub tensor is taken to be (0, 0, 0) The offset of the sub tensor relative to the source tensor is taken to be (0, 0, 0)
Definition at line 327 of file TTL_cpp/TTL_tensors.h.
|
inline |
TTL_sub_tensor(TTL_create_, const_1, location, type, sub, _1_param)
Simply create a sub_tensor from an origin tensor
origin_tensor | The tensor that originated the sub tensor |
Effective creates a sub-tensor that is a tensor covering 100% of the source tensor
Definition at line 343 of file TTL_cpp/TTL_tensors.h.
|
inline |
Create an empty tiled internal tensor. Empty means it has all dimensions set to zero.
Most operations on an empty tensor should turn into no-ops and so an empty tensor is the safest default state.
Definition at line 354 of file TTL_cpp/TTL_tensors.h.
|
inline |
A Tensor is empty if its shape is empty.
tensor | The tensor to test for emptiness |
Definition at line 391 of file TTL_cpp/TTL_tensors.h.
|
inline |
Read a value from a sub_tensor.
x | The offset in the x dimension |
y | The offset in the y dimension |
z | The offset in the z dimension |
No bounds checking is performed.
Definition at line 367 of file TTL_cpp/TTL_tensors.h.
|
inline |
Write a value to a sub_tensor.
value | The value to write |
x | The offset in the x dimension |
y | The offset in the y dimension |
z | The offset in the z dimension |
Definition at line 379 of file TTL_cpp/TTL_tensors.h.
Origin TTL_sub_tensor< TENSORTYPE >::origin |
Definition at line 408 of file TTL_cpp/TTL_tensors.h.
TTL_tensor<TENSORTYPE> TTL_sub_tensor< TENSORTYPE >::tensor |
Definition at line 407 of file TTL_cpp/TTL_tensors.h.