BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
bc::Shape< 1 > Struct Template Reference

#include <shape.h>

Public Types

using size_t = bc::size_t
 
using value_type = size_t
 

Public Member Functions

BCINLINE Shape ()
 
BCINLINE Shape (bc::Dim< 1 > param)
 
template<int X, class = std::enable_if_t<(X>=1>
BCINLINE Shape (const Shape< X > &shape)
 
BCINLINE Shape (int length)
 
BCINLINE size_t operator[] (size_t i) const
 
BCINLINE size_t size () const
 
BCINLINE size_t rows () const
 
BCINLINE size_t cols () const
 
BCINLINE size_t dim (size_t i) const
 
BCINLINE size_t outer_dim () const
 
BCINLINE size_t leading_dim (size_t i=0) const
 
BCINLINE const auto & inner_shape () const
 
BCINLINE bool operator== (const Shape< 1 > &other) const
 
template<class... Integers>
BCINLINE size_t dims_to_index (size_t i, Integers... ints) const
 
template<class... Integers>
BCINLINE size_t dims_to_index (size_t i) const
 
BCINLINE size_t coefficientwise_dims_to_index (size_t i) const
 

Static Public Attributes

static constexpr int tensor_dim = 1
 

Friends

template<int >
struct Shape
 

Member Typedef Documentation

◆ size_t

using bc::Shape< 1 >::size_t = bc::size_t

◆ value_type

using bc::Shape< 1 >::value_type = size_t

Constructor & Destructor Documentation

◆ Shape() [1/4]

BCINLINE bc::Shape< 1 >::Shape ( )
inline

◆ Shape() [2/4]

BCINLINE bc::Shape< 1 >::Shape ( bc::Dim< 1 >  param)
inline

◆ Shape() [3/4]

template<int X, class = std::enable_if_t<(X>=1>
BCINLINE bc::Shape< 1 >::Shape ( const Shape< X > &  shape)
inline

◆ Shape() [4/4]

BCINLINE bc::Shape< 1 >::Shape ( int  length)
inline

Member Function Documentation

◆ coefficientwise_dims_to_index()

BCINLINE size_t bc::Shape< 1 >::coefficientwise_dims_to_index ( size_t  i) const
inline

◆ cols()

BCINLINE size_t bc::Shape< 1 >::cols ( ) const
inline

◆ dim()

BCINLINE size_t bc::Shape< 1 >::dim ( size_t  i) const
inline

◆ dims_to_index() [1/2]

template<class... Integers>
BCINLINE size_t bc::Shape< 1 >::dims_to_index ( size_t  i,
Integers...  ints 
) const
inline

◆ dims_to_index() [2/2]

template<class... Integers>
BCINLINE size_t bc::Shape< 1 >::dims_to_index ( size_t  i) const
inline

◆ inner_shape()

BCINLINE const auto& bc::Shape< 1 >::inner_shape ( ) const
inline

◆ leading_dim()

BCINLINE size_t bc::Shape< 1 >::leading_dim ( size_t  i = 0) const
inline

◆ operator==()

BCINLINE bool bc::Shape< 1 >::operator== ( const Shape< 1 > &  other) const
inline

◆ operator[]()

BCINLINE size_t bc::Shape< 1 >::operator[] ( size_t  i) const
inline

◆ outer_dim()

BCINLINE size_t bc::Shape< 1 >::outer_dim ( ) const
inline

◆ rows()

BCINLINE size_t bc::Shape< 1 >::rows ( ) const
inline

◆ size()

BCINLINE size_t bc::Shape< 1 >::size ( ) const
inline

Friends And Related Function Documentation

◆ Shape

template<int >
friend struct Shape
friend

Member Data Documentation

◆ tensor_dim

constexpr int bc::Shape< 1 >::tensor_dim = 1
static

The documentation for this struct was generated from the following file: