26template <
typename T>
class Tensor final
31 T
at(
const Index &
id)
const {
return *
reinterpret_cast<T *
>(this->_proxy.
at(
id)); }
33 T &
at(
const Index &
id) {
return *
reinterpret_cast<T *
>(this->_proxy.
at(
id)); }
43 auto base =
reinterpret_cast<T *
>(_proxy.
at(idx));
int32_t & at(int32_t axis)
return position on given axis
int32_t & dim(int32_t axis) noexcept
ExternalRegion< T > getRegion(const Index &idx)
T atOffset(int32_t offset) const
Tensor(const TensorVariant &t)
const Shape & getShape() const
T at(const Index &id) const
T & atOffset(int32_t offset)
char * atOffset(int32_t offset) const
const Shape & getShape() const
char * at(const Index &idx) const
__global uchar * offset(const Image *img, int x, int y)