BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Public Types | Public Member Functions | List of all members
bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags > Struct Template Reference

#include <array.h>

Inheritance diagram for bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >:
Inheritance graph
[legend]
Collaboration diagram for bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >:
Collaboration graph
[legend]

Public Types

using system_tag = typename bc::allocator_traits< Allocator >::system_tag
 
using value_type = ValueType
 
using allocator_type = Allocator
 
using stream_type = bc::Stream< system_tag >
 
using shape_type = Shape
 
using move_assignable = std::false_type
 
using copy_assignable = bc::traits::not_type< bc::traits::sequence_contains_v< BC_Const_View, Tags... > >
 
- Public Types inherited from bc::tensors::exprs::Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... >
using value_type = ValueType
 
using system_tag = bc::allocator_traits< Allocator >::system_tag
 
using shape_type = Shape
 
- Public Types inherited from bc::tensors::exprs::Kernel_Array_Base< Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... > >
using expression_template_array_type = std::true_type
 
- Public Types inherited from bc::Shape< N >
using size_t = bc::size_t
 
using value_type = size_t
 

Public Member Functions

template<class... Args>
 Array_Slice (stream_type stream, allocator_type allocator, Args... args)
 
const allocator_typeget_allocator () const
 
allocator_typeget_allocator ()
 
const stream_typeget_stream () const
 
stream_typeget_stream ()
 
- Public Member Functions inherited from bc::tensors::exprs::Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... >
BCINLINE Kernel_Array ()
 
BCINLINE Kernel_Array (shape_type shape, value_type *ptr)
 
 Kernel_Array (shape_type shape, AllocatorType allocator)
 
BCINLINE value_typedata () const
 
BCINLINE shape_type get_shape () const
 
BCINLINE const return_type & operator[] (bc::size_t index) const
 
BCINLINE return_type & operator[] (bc::size_t index)
 
BCINLINE const return_type & operator() (Integers ... ints) const
 
BCINLINE return_type & operator() (Integers ... ints)
 
BCHOT void deallocate (Allocator allocator)
 
void deallocate () const
 
BCHOT void reset (Allocator allocator)
 
- Public Member Functions inherited from bc::tensors::exprs::Kernel_Array_Base< Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... > >
BCINLINE Kernel_Array_Base ()
 
- Public Member Functions inherited from bc::tensors::exprs::Expression_Template_Base< Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... > >
BCINLINE const Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... > & expression_template () const
 
BCINLINE Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... > & expression_template ()
 
BCINLINE Expression_Template_Base ()
 
void deallocate () const
 
- Public Member Functions inherited from bc::Shape< N >
BCINLINE Shape ()
 
template<class... Integers, class = std::enable_if_t< bc::traits::sequence_of_v<size_t, Integers...> && (sizeof...(Integers) == N)>>
BCINLINE Shape (Integers... ints)
 
template<int X, class = std::enable_if_t<(X > N>
BCINLINE Shape (const Shape< X > &shape)
 
BCINLINE Shape (Dim< N > new_shape, const Shape< N > &parent_shape)
 
BCINLINE Shape (const Shape< N > &new_shape, const Shape< N > &parent_shape)
 
BCINLINE Shape (Dim< N > dims)
 
BCINLINE const auto & inner_shape () const
 
BCINLINE const auto & outer_shape () const
 
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 (int i) const
 
BCINLINE size_t outer_dim () const
 
BCINLINE size_t leading_dim (int i=N-1) const
 
BCINLINE bool operator== (const Shape &other) const
 
BCINLINE size_t coefficientwise_dims_to_index (size_t index) const
 
template<class... Integers, class = std::enable_if_t< bc::traits::sequence_of_v<size_t, Integers...> && (sizeof...(Integers) >= N>
BCINLINE size_t dims_to_index (Integers... ints) const
 
template<int D, class = std::enable_if_t<(D>=N>
BCINLINE size_t dims_to_index (const Dim< D > &var) const
 

Additional Inherited Members

- Static Public Attributes inherited from bc::tensors::exprs::Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... >
static constexpr int tensor_dim
 
static constexpr int tensor_iterator_dim
 
- Static Public Attributes inherited from bc::Shape< N >
static constexpr int tensor_dim = N
 
- Protected Attributes inherited from bc::tensors::exprs::Kernel_Array< Shape, ValueType, bc::allocator_traits< Allocator >::system_tag, Tags... >
value_typem_data
 

Member Typedef Documentation

◆ allocator_type

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::allocator_type = Allocator

◆ copy_assignable

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::copy_assignable = bc::traits::not_type<bc::traits::sequence_contains_v<BC_Const_View, Tags...> >

◆ move_assignable

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::move_assignable = std::false_type

◆ shape_type

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::shape_type = Shape

◆ stream_type

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::stream_type = bc::Stream<system_tag>

◆ system_tag

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::system_tag = typename bc::allocator_traits<Allocator>::system_tag

◆ value_type

template<class Shape , class ValueType , class Allocator , class... Tags>
using bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::value_type = ValueType

Constructor & Destructor Documentation

◆ Array_Slice()

template<class Shape , class ValueType , class Allocator , class... Tags>
template<class... Args>
bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::Array_Slice ( stream_type  stream,
allocator_type  allocator,
Args...  args 
)
inline

Member Function Documentation

◆ get_allocator() [1/2]

template<class Shape , class ValueType , class Allocator , class... Tags>
const allocator_type& bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::get_allocator ( ) const
inline

◆ get_allocator() [2/2]

template<class Shape , class ValueType , class Allocator , class... Tags>
allocator_type& bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::get_allocator ( )
inline

◆ get_stream() [1/2]

template<class Shape , class ValueType , class Allocator , class... Tags>
const stream_type& bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::get_stream ( ) const
inline

◆ get_stream() [2/2]

template<class Shape , class ValueType , class Allocator , class... Tags>
stream_type& bc::tensors::exprs::Array_Slice< Shape, ValueType, Allocator, Tags >::get_stream ( )
inline

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