Skip to content

impl

Name Description
AlignedAllocator
Return Name Description
bool operator== noexcept
bool operator!= noexcept
void scatter_reduce_recursive Scatter src values into dest using indices. Src and indices must be the of the same shape.
void fill_recursive Recursively fill an array with with a scalar value.
void assign_recursive Recursively assign one array to another. The shapes MUST match.
void copy_into_recursive Recursively copy an array into an output location.
void unary_reduce_recursive Recursively operate on a single array for unary operations (like logical not).
void binary_reduce_recursive Recursively operate on two arrays.
void inplace_unary_reduce_recursive Recursively operate inplace on an array for unary operations.
void inplace_binary_reduce_recursive Binary operation recursed inplace.
void binary_scalar_recursive Recursively operate on an array, broadcasting a scalar.
void inplace_binary_scalar_recursive Binary operation recursed inplace, broadcasting a scalar.
AccumT reduce_recursive Recursively reduce an array to a scalar.

noexcept

template<typename T1, std::size_t A1, typename T2, std::size_t A2> bool operator==(const AlignedAllocator< T1, A1 > &, const AlignedAllocator< T2, A2 > &) noexcept

noexcept

template<typename T1, std::size_t A1, typename T2, std::size_t A2> bool operator!=(const AlignedAllocator< T1, A1 > &, const AlignedAllocator< T2, A2 > &) noexcept

template<typename DestT, typename IndexT, typename SrcT, class Op, ArrayLike Dest, ArrayLike Index, ArrayLike Src> void scatter_reduce_recursive(Dest & dest, const Index & indices, const Src & src, void * dest_ptr, const void * idx_ptr, const void * src_ptr, ssize_t axis, Op op)

Scatter src values into dest using indices. Src and indices must be the of the same shape.


template<typename T, ArrayLike A> void fill_recursive(const A & arr, void * current_data, ssize_t axis, T value)

Recursively fill an array with with a scalar value.

This function can cast the value as it is assigned.

  • T The type of the value to fill into the array.

  • A The type of the array being operated on (ArrayLike constrained.)

  • arr The array.

  • current_data The pointer to the current data in the array.

  • axis The current axis being traversed.

  • value The value to fill into the array.


template<typename DestT, typename SrcT, ArrayLike Dest, ArrayLike Src> void assign_recursive(Dest & dest, const Src & src, void * dest_data, const void * src_data, ssize_t axis)

Recursively assign one array to another. The shapes MUST match.

This function can cast the values as they are assigned.

  • DestT The dtype of the destination array.

  • SrcT The dtype of the source array.

  • Dest The type of array to assign to. (ArrayLike constrained.)

  • Src The type of array to pull values from. (ArrayLike constrained.)

  • dest The array to assign to.

  • src The array to pull values from.

  • dest_data The pointer to the current data in the destination.

  • src_data The pointer to the current data in the source.

  • axis The current axis being traversed.


template<typename T, typename OutputType, ArrayLike A> void copy_into_recursive(const A & arr, const void * current_src, ssize_t axis, OutputType *& dest)

Recursively copy an array into an output location.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • OutputType The dtype for the destination array.

  • arr The array.

  • current_src The pointer to the current data in the source array.

  • axis The current axis being traversed.

  • dest Reference to pointer for the destination array.


template<typename T, typename Op, typename ResultTOrAccumT, ArrayLike A> void unary_reduce_recursive(const A & arr, const void * data, ssize_t axis, Op op, ResultTOrAccumT *& res)

Recursively operate on a single array for unary operations (like logical not).

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • Op The type of the reduction function.

  • AccumT The type of the value being accumulated into.

  • A The type of the array.

  • arr The input array.

  • data The pointer to the current data in the array.

  • axis The current axis being traversed.

  • op The reduction operation.

  • res The output array’s data.


template<typename T, typename Op, typename ResultTOrAccumT, ArrayLike A, ArrayLike B> void binary_reduce_recursive(const A & left_arr, const B & right_arr, const void * lhs_data, const void * rhs_data, ssize_t axis, Op op, ResultTOrAccumT *& res)

Recursively operate on two arrays.

This function assumes the arrays are the same shape, except if there are extra padding dimensions. In that case (i.e., leading dimensions of size 1) a shape mismatch is tolerated.

E.g. this function can do binary add/subtract/multiply and so on.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • Op The type of the reduction function.

  • AccumT The type of the value being accumulated into.

  • A The type of the left hand side array.

  • B The type of the right hand side array.

  • left_arr The left hand side array.

  • right_arr The right hand side array.

  • lhs_data The pointer to the current data in the left hand side array.

  • right_data The pointer to the current right hand side’s data.

  • axis The current axis being traversed.

  • op The reduction operation.

  • res The output array’s data.


template<typename T, typename Op, ArrayLike A> void inplace_unary_reduce_recursive(const A & arr, const void * data, ssize_t axis, Op op)

Recursively operate inplace on an array for unary operations.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • Op The type of the reduction function.

  • A The type of the array.

  • arr The input array.

  • data The pointer to the current data in the array.

  • axis The current axis being traversed.

  • op The reduction operation.

  • res The output array’s data.


template<typename T, typename Op, ArrayLike A, ArrayLike B> void inplace_binary_reduce_recursive(const A & left_arr, const B & right_arr, const void * lhs_data, const void * rhs_data, ssize_t axis, Op op)

Binary operation recursed inplace.

This function assumes the arrays are the same shape, except if there are extra padding dimensions. In that case (i.e., leading dimensions of size 1) a shape mismatch is tolerated.

E.g. this function can do binary add/subtract/multiply and so on.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • Op The type of the reduction function.

  • AccumT The type of the value being accumulated into.

  • A The type of the left hand side array.

  • B The type of the right hand side array.

  • left_arr The left hand side array.

  • right_arr The right hand side array.

  • lhs_data The pointer to the current data in the left hand side array.

  • right_data The pointer to the current right hand side’s data.

  • axis The current axis being traversed.

  • op The reduction operation.


template<typename T, typename ScalarT, typename Op, typename ResultT, ArrayLike A> void binary_scalar_recursive(const A & arr, const void * current_data, const ScalarT scalar_val, ssize_t axis, Op op, ResultT *& res)

Recursively operate on an array, broadcasting a scalar.

E.g. this function can do binary add/subtract/multiply and so on.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • ScalarT The type of the scalar.

  • Op The type of the reduction function.

  • ResultT The type of the output array.

  • A The type of the left hand side array.

  • arr The array.

  • current_data The pointer to the current data in the source array.

  • scalar_val The scalar to broadcast.

  • axis The current axis being traversed.

  • op The reduction operation.

  • res The output array.


template<typename T, typename ScalarT, typename Op, ArrayLike A> void inplace_binary_scalar_recursive(const A & arr, void * current_data, const ScalarT scalar_val, ssize_t axis, Op op)

Binary operation recursed inplace, broadcasting a scalar.

This function assumes the arrays are the same shape, except if there are extra padding dimensions. In that case (i.e., leading dimensions of size 1) a shape mismatch is tolerated.

E.g. this function can do binary add/subtract/multiply and so on.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • ScalarT The type of the scalar.

  • Op The type of the reduction function.

  • ResultT The type of the output array.

  • A The type of the left hand side array.

  • arr The array.

  • current_data The pointer to the current data in the source array.

  • scalar_val The scalar to broadcast.

  • axis The current axis being traversed.

  • op The reduction operation.


template<typename T, typename Op, typename AccumT, ArrayLike A> AccumT reduce_recursive(const A & arr, const void * current_data, ssize_t axis, Op op, AccumT acc)

Recursively reduce an array to a scalar.

This function can cast the value as it is assigned.

  • T The dtype for the source array.

  • Op The type of the reduction function.

  • AccumT The type of the value being accumulated into.

  • A The type of the array object.

  • arr The array.

  • current_data The pointer to the current data in the source array.

  • axis The current axis being traversed.

  • op The reduction operation.

  • acc The identity value for the reduction. (on recursion it accumulates)