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 1788 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 1822 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 1824 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 1826 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 1808 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 1911 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 1885 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 1810 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 1836 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 1818 of file numpy.h.

◆ N

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

Definition at line 1797 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...)
staticprivate

Definition at line 1798 of file numpy.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:10