Template Struct ConstantShape¶
Defined in File shape.h
Nested Relationships¶
Nested Types¶
Struct Documentation¶
-
template<const int
N
>
structConstantShape
¶ Represents the size of each dimension in a tensor.
Public Functions
-
HOST_DEVICE
ConstantShape
()¶
-
HOST_DEVICE
ConstantShape
(const ConstantShape &shape)¶
-
HOST_DEVICE
ConstantShape
(const Array<int, N> &shape, const Array<int, N> &stride, size_t offset)¶
-
HOST_DEVICE_INLINE void marian::functional::ConstantShape::updateStrides()
-
HOST_DEVICE_INLINE void marian::functional::ConstantShape::updateElements()
-
HOST_DEVICE_INLINE void marian::functional::ConstantShape::set(int i, int dim)
-
const HOST_DEVICE_INLINE int& marian::functional::ConstantShape::dim(int i) const
-
const HOST_DEVICE_INLINE int& marian::functional::ConstantShape::back() const
-
const HOST_DEVICE_INLINE int& marian::functional::ConstantShape::operator[](int i) const
-
const HOST_DEVICE_INLINE int& marian::functional::ConstantShape::stride(int i) const
-
const HOST_DEVICE_INLINE int& marian::functional::ConstantShape::bstride(int i) const
-
HOST_DEVICE_INLINE int marian::functional::ConstantShape::elements() const
-
HOST_DEVICE_INLINE int marian::functional::ConstantShape::index(const Array < int, N > & dims) const
-
HOST_DEVICE_INLINE int marian::functional::ConstantShape::index(int si) const
-
HOST_DEVICE_INLINE void marian::functional::ConstantShape::dims(int si, Array < int, N > & dims) const
-
HOST_DEVICE_INLINE int marian::functional::ConstantShape::bindex(const Array < int, N > & dims) const
-
HOST_DEVICE_INLINE bool marian::functional::ConstantShape::operator==(const ConstantShape & other) const
-
HOST_DEVICE_INLINE bool marian::functional::ConstantShape::operator!=(const ConstantShape & other) const
Public Members
-
Array<int, N>
shape_
¶
-
Array<int, N>
stride_
¶
-
Array<int, N>
bstride_
¶
-
size_t
elements_
= {1}¶
-
size_t
offset_
= {0}¶
Public Static Functions
-
static constexpr HOST_DEVICE_INLINE size_t marian::functional::ConstantShape::size()
Friends
-
std::ostream &
operator<<
(std::ostream &strm, const ConstantShape<N> &shape)¶
-
template<const int
K
, const intD
>
structI
¶ Public Static Functions
-
static HOST_DEVICE_INLINE int marian::functional::ConstantShape< N >::I::index(const Array < int, D > & dims, const Array < int, D > & stride)
-
static HOST_DEVICE_INLINE int marian::functional::ConstantShape< N >::I::index(int si, const Array < int, D > & shape, const Array < int, D > & stride)
-
static HOST_DEVICE_INLINE void marian::functional::ConstantShape< N >::I::dims(int si, Array < int, D > & dims, const Array < int, D > & shape)
-
-
template<const int
D
>
structI
<0, D>¶ Public Static Functions
-
static HOST_DEVICE_INLINE int marian::functional::ConstantShape< N >::I::index(const Array < int, D > & dims, const Array < int, D > & stride)
-
static HOST_DEVICE_INLINE int marian::functional::ConstantShape< N >::I::index(int si, const Array < int, D > & shape, const Array < int, D > & stride)
-
static HOST_DEVICE_INLINE void marian::functional::ConstantShape< N >::I::dims(int si, Array < int, D > & dims, const Array < int, D > & shape)
-
-
HOST_DEVICE