BlackCat_Tensors
A GPU-supported autograd and linear algebra library, designed for neural network construction
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bc::tensors::exprs::Bin_Op< Operation, Lv, Rv > Struct Template Reference

#include <common.h>

Inheritance diagram for bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >:
Inheritance graph
[legend]
Collaboration diagram for bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >:
Collaboration graph
[legend]

Public Types

using system_tag = typename Lv::system_tag
 
using value_type = std::decay_t< decltype(std::declval< Operation >().operator()(std::declval< typename Lv::value_type >(), std::declval< typename Rv::value_type >()))>
 
- Public Types inherited from bc::tensors::exprs::Expression_Base< Bin_Op< Operation, Lv, Rv > >
using copy_constructible = std::false_type
 
using move_constructible = std::false_type
 
using copy_assignable = std::false_type
 
using move_assignable = std::false_type
 
using expression_template_expression_type = std::true_type
 

Public Member Functions

Operation get_operation () const
 
template<class... Args>
BCHOT Bin_Op (Lv lv, Rv rv, const Args &... args)
 
BCINLINE auto operator[] (bc::size_t index) const
 
BCINLINE auto operator[] (bc::size_t index)
 
template<class... Integers, class = std::enable_if_t< (sizeof...(Integers)>=tensor_iterator_dim>
BCINLINE auto operator() (Integers... ints) const
 
template<class... Integers, class = std::enable_if_t<( sizeof...(Integers)>=tensor_iterator_dim>
BCINLINE auto operator() (Integers... ints)
 
BCINLINE bc::size_t size () const
 
BCINLINE bc::size_t rows () const
 
BCINLINE bc::size_t cols () const
 
BCINLINE bc::size_t dim (int i) const
 
BCINLINE auto inner_shape () const
 
- Public Member Functions inherited from bc::tensors::exprs::Expression_Base< Bin_Op< Operation, Lv, Rv > >
BCINLINE const auto inner_shape () const
 
BCINLINE const auto get_shape () const
 
BCINLINE bc::size_t outer_dim () const
 
- Public Member Functions inherited from bc::tensors::exprs::Expression_Template_Base< Bin_Op< Operation, Lv, Rv > >
BCINLINE const Bin_Op< Operation, Lv, Rv > & expression_template () const
 
BCINLINE Bin_Op< Operation, Lv, Rv > & expression_template ()
 
BCINLINE Expression_Template_Base ()
 
void deallocate () const
 

Public Attributes

Lv left
 
Rv right
 

Static Public Attributes

static constexpr int tensor_dim
 
static constexpr int tensor_iterator_dim
 

Member Typedef Documentation

◆ system_tag

template<class Operation, class Lv, class Rv>
using bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::system_tag = typename Lv::system_tag

◆ value_type

template<class Operation, class Lv, class Rv>
using bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::value_type = std::decay_t<decltype( std::declval<Operation>().operator()( std::declval<typename Lv::value_type>(), std::declval<typename Rv::value_type>()))>

Constructor & Destructor Documentation

◆ Bin_Op()

template<class Operation, class Lv, class Rv>
template<class... Args>
BCHOT bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::Bin_Op ( Lv  lv,
Rv  rv,
const Args &...  args 
)
inline

Member Function Documentation

◆ cols()

template<class Operation, class Lv, class Rv>
BCINLINE bc::size_t bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::cols ( ) const
inline

◆ dim()

template<class Operation, class Lv, class Rv>
BCINLINE bc::size_t bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::dim ( int  i) const
inline

◆ get_operation()

template<class Operation, class Lv, class Rv>
Operation bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::get_operation ( ) const
inline

◆ inner_shape()

template<class Operation, class Lv, class Rv>
BCINLINE auto bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::inner_shape ( ) const
inline

◆ operator()() [1/2]

template<class Operation, class Lv, class Rv>
template<class... Integers, class = std::enable_if_t< (sizeof...(Integers)>=tensor_iterator_dim>
BCINLINE auto bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::operator() ( Integers...  ints) const
inline

◆ operator()() [2/2]

template<class Operation, class Lv, class Rv>
template<class... Integers, class = std::enable_if_t<( sizeof...(Integers)>=tensor_iterator_dim>
BCINLINE auto bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::operator() ( Integers...  ints)
inline

◆ operator[]() [1/2]

template<class Operation, class Lv, class Rv>
BCINLINE auto bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::operator[] ( bc::size_t  index) const
inline

◆ operator[]() [2/2]

template<class Operation, class Lv, class Rv>
BCINLINE auto bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::operator[] ( bc::size_t  index)
inline

◆ rows()

template<class Operation, class Lv, class Rv>
BCINLINE bc::size_t bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::rows ( ) const
inline

◆ size()

template<class Operation, class Lv, class Rv>
BCINLINE bc::size_t bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::size ( ) const
inline

Member Data Documentation

◆ left

template<class Operation, class Lv, class Rv>
Lv bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::left

◆ right

template<class Operation, class Lv, class Rv>
Rv bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::right

◆ tensor_dim

template<class Operation, class Lv, class Rv>
constexpr int bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::tensor_dim
static
Initial value:
=
bc::traits::max(Lv::tensor_dim, Rv::tensor_dim)

◆ tensor_iterator_dim

template<class Operation, class Lv, class Rv>
constexpr int bc::tensors::exprs::Bin_Op< Operation, Lv, Rv >::tensor_iterator_dim
static
Initial value:
=
is_broadcast_expression || !continuous_mem_layout ?
max_dim :
max_iterator

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