impl
Classes
Section titled “Classes”| Name | Description |
|---|---|
AlignedAllocator |
Functions
Section titled “Functions”| 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. |
operator==
Section titled “operator==”noexcept
template<typename T1, std::size_t A1, typename T2, std::size_t A2> bool operator==(const AlignedAllocator< T1, A1 > &, const AlignedAllocator< T2, A2 > &) noexceptoperator!=
Section titled “operator!=”noexcept
template<typename T1, std::size_t A1, typename T2, std::size_t A2> bool operator!=(const AlignedAllocator< T1, A1 > &, const AlignedAllocator< T2, A2 > &) noexceptscatter_reduce_recursive
Section titled “scatter_reduce_recursive”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.
fill_recursive
Section titled “fill_recursive”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.
Parameters
Section titled “Parameters”-
TThe type of the value to fill into the array. -
AThe type of the array being operated on (ArrayLike constrained.)
Parameters
Section titled “Parameters”-
arrThe array. -
current_dataThe pointer to the current data in the array. -
axisThe current axis being traversed. -
valueThe value to fill into the array.
assign_recursive
Section titled “assign_recursive”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.
Parameters
Section titled “Parameters”-
DestTThe dtype of the destination array. -
SrcTThe dtype of the source array. -
DestThe type of array to assign to. (ArrayLike constrained.) -
SrcThe type of array to pull values from. (ArrayLike constrained.)
Parameters
Section titled “Parameters”-
destThe array to assign to. -
srcThe array to pull values from. -
dest_dataThe pointer to the current data in the destination. -
src_dataThe pointer to the current data in the source. -
axisThe current axis being traversed.
copy_into_recursive
Section titled “copy_into_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OutputTypeThe dtype for the destination array.
Parameters
Section titled “Parameters”-
arrThe array. -
current_srcThe pointer to the current data in the source array. -
axisThe current axis being traversed. -
destReference to pointer for the destination array.
unary_reduce_recursive
Section titled “unary_reduce_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OpThe type of the reduction function. -
AccumTThe type of the value being accumulated into. -
AThe type of the array.
Parameters
Section titled “Parameters”-
arrThe input array. -
dataThe pointer to the current data in the array. -
axisThe current axis being traversed. -
opThe reduction operation. -
resThe output array’s data.
binary_reduce_recursive
Section titled “binary_reduce_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OpThe type of the reduction function. -
AccumTThe type of the value being accumulated into. -
AThe type of the left hand side array. -
BThe type of the right hand side array.
Parameters
Section titled “Parameters”-
left_arrThe left hand side array. -
right_arrThe right hand side array. -
lhs_dataThe pointer to the current data in the left hand side array. -
right_dataThe pointer to the current right hand side’s data. -
axisThe current axis being traversed. -
opThe reduction operation. -
resThe output array’s data.
inplace_unary_reduce_recursive
Section titled “inplace_unary_reduce_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OpThe type of the reduction function. -
AThe type of the array.
Parameters
Section titled “Parameters”-
arrThe input array. -
dataThe pointer to the current data in the array. -
axisThe current axis being traversed. -
opThe reduction operation. -
resThe output array’s data.
inplace_binary_reduce_recursive
Section titled “inplace_binary_reduce_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OpThe type of the reduction function. -
AccumTThe type of the value being accumulated into. -
AThe type of the left hand side array. -
BThe type of the right hand side array.
Parameters
Section titled “Parameters”-
left_arrThe left hand side array. -
right_arrThe right hand side array. -
lhs_dataThe pointer to the current data in the left hand side array. -
right_dataThe pointer to the current right hand side’s data. -
axisThe current axis being traversed. -
opThe reduction operation.
binary_scalar_recursive
Section titled “binary_scalar_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
ScalarTThe type of the scalar. -
OpThe type of the reduction function. -
ResultTThe type of the output array. -
AThe type of the left hand side array.
Parameters
Section titled “Parameters”-
arrThe array. -
current_dataThe pointer to the current data in the source array. -
scalar_valThe scalar to broadcast. -
axisThe current axis being traversed. -
opThe reduction operation. -
resThe output array.
inplace_binary_scalar_recursive
Section titled “inplace_binary_scalar_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
ScalarTThe type of the scalar. -
OpThe type of the reduction function. -
ResultTThe type of the output array. -
AThe type of the left hand side array.
Parameters
Section titled “Parameters”-
arrThe array. -
current_dataThe pointer to the current data in the source array. -
scalar_valThe scalar to broadcast. -
axisThe current axis being traversed. -
opThe reduction operation.
reduce_recursive
Section titled “reduce_recursive”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.
Parameters
Section titled “Parameters”-
TThe dtype for the source array. -
OpThe type of the reduction function. -
AccumTThe type of the value being accumulated into. -
AThe type of the array object.
Parameters
Section titled “Parameters”-
arrThe array. -
current_dataThe pointer to the current data in the source array. -
axisThe current axis being traversed. -
opThe reduction operation. -
accThe identity value for the reduction. (on recursion it accumulates)