Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
vectorize_helper< Func, Return, Args > Struct Template Reference

#include <numpy.h>

Public Member Functions

object operator() (typename vectorize_arg< Args >::type... args)
 
template<typename T , typename = detail::enable_if_t< !std::is_same<vectorize_helper, typename std::decay<T>::type>::value>>
 vectorize_helper (T &&f)
 

Private Types

using arg_call_types = std::tuple< typename vectorize_arg< Args >::call_type... >
 
template<size_t Index>
using param_n_t = typename std::tuple_element< Index, arg_call_types >::type
 
using returned_array = vectorize_returned_array< Func, Return, Args... >
 

Private Member Functions

template<size_t... Index, size_t... VIndex, size_t... BIndex>
void apply_broadcast (std::array< buffer_info, NVectorized > &buffers, std::array< void *, N > &params, Return *out, size_t size, const std::vector< ssize_t > &output_shape, index_sequence< Index... >, index_sequence< VIndex... >, index_sequence< BIndex... >)
 
template<size_t... Index, size_t... VIndex, size_t... BIndex>
void apply_trivial (std::array< buffer_info, NVectorized > &buffers, std::array< void *, N > &params, Return *out, size_t size, index_sequence< Index... >, index_sequence< VIndex... >, index_sequence< BIndex... >)
 
template<size_t... Index, size_t... VIndex, size_t... BIndex>
object run (typename vectorize_arg< Args >::type &...args, index_sequence< Index... > i_seq, index_sequence< VIndex... > vi_seq, index_sequence< BIndex... > bi_seq)
 

Private Attributes

remove_reference_t< Func > f
 

Static Private Attributes

static constexpr size_t N = sizeof...(Args)
 
static constexpr size_t NVectorized = constexpr_sum(vectorize_arg<Args>::vectorize...)
 

Detailed Description

template<typename Func, typename Return, typename... Args>
struct vectorize_helper< Func, Return, Args >

Definition at line 1933 of file numpy.h.

Member Typedef Documentation

◆ arg_call_types

template<typename Func , typename Return , typename... Args>
using vectorize_helper< Func, Return, Args >::arg_call_types = std::tuple<typename vectorize_arg<Args>::call_type...>
private

Definition at line 1967 of file numpy.h.

◆ param_n_t

template<typename Func , typename Return , typename... Args>
template<size_t Index>
using vectorize_helper< Func, Return, Args >::param_n_t = typename std::tuple_element<Index, arg_call_types>::type
private

Definition at line 1969 of file numpy.h.

◆ returned_array

template<typename Func , typename Return , typename... Args>
using vectorize_helper< Func, Return, Args >::returned_array = vectorize_returned_array<Func, Return, Args...>
private

Definition at line 1971 of file numpy.h.

Constructor & Destructor Documentation

◆ vectorize_helper()

template<typename Func , typename Return , typename... Args>
template<typename T , typename = detail::enable_if_t< !std::is_same<vectorize_helper, typename std::decay<T>::type>::value>>
vectorize_helper< Func, Return, Args >::vectorize_helper ( T &&  f)
inlineexplicit

Definition at line 1953 of file numpy.h.

Member Function Documentation

◆ apply_broadcast()

template<typename Func , typename Return , typename... Args>
template<size_t... Index, size_t... VIndex, size_t... BIndex>
void vectorize_helper< Func, Return, Args >::apply_broadcast ( std::array< buffer_info, NVectorized > &  buffers,
std::array< void *, N > &  params,
Return *  out,
size_t  size,
const std::vector< ssize_t > &  output_shape,
index_sequence< Index... >  ,
index_sequence< VIndex... >  ,
index_sequence< BIndex... >   
)
inlineprivate

Definition at line 2062 of file numpy.h.

◆ apply_trivial()

template<typename Func , typename Return , typename... Args>
template<size_t... Index, size_t... VIndex, size_t... BIndex>
void vectorize_helper< Func, Return, Args >::apply_trivial ( std::array< buffer_info, NVectorized > &  buffers,
std::array< void *, N > &  params,
Return *  out,
size_t  size,
index_sequence< Index... >  ,
index_sequence< VIndex... >  ,
index_sequence< BIndex... >   
)
inlineprivate

Definition at line 2036 of file numpy.h.

◆ operator()()

template<typename Func , typename Return , typename... Args>
object vectorize_helper< Func, Return, Args >::operator() ( typename vectorize_arg< Args >::type...  args)
inline

Definition at line 1955 of file numpy.h.

◆ run()

template<typename Func , typename Return , typename... Args>
template<size_t... Index, size_t... VIndex, size_t... BIndex>
object vectorize_helper< Func, Return, Args >::run ( typename vectorize_arg< Args >::type &...  args,
index_sequence< Index... >  i_seq,
index_sequence< VIndex... >  vi_seq,
index_sequence< BIndex... >  bi_seq 
)
inlineprivate

Definition at line 1981 of file numpy.h.

Member Data Documentation

◆ f

template<typename Func , typename Return , typename... Args>
remove_reference_t<Func> vectorize_helper< Func, Return, Args >::f
private

Definition at line 1963 of file numpy.h.

◆ N

template<typename Func , typename Return , typename... Args>
constexpr size_t vectorize_helper< Func, Return, Args >::N = sizeof...(Args)
staticconstexprprivate

Definition at line 1942 of file numpy.h.

◆ NVectorized

template<typename Func , typename Return , typename... Args>
constexpr size_t vectorize_helper< Func, Return, Args >::NVectorized = constexpr_sum(vectorize_arg<Args>::vectorize...)
staticconstexprprivate

Definition at line 1943 of file numpy.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:10:18