A class for mapping and slicing operations. More...
#include <MappingOps.hpp>
Static Public Member Functions | |
static void | assignMappingIndices (jint *indices, const jint *dims, const jint *strides, jint nDims) |
Creates an array of physical indices. More... | |
static void | assignSlicingIndices (jint *indices, const jint *dims, const jint *strides, jint nDims, jint **sliceIndices) |
Creates an array of physical slicing indices. More... | |
static void | checkDimensions (const jint *dims, const jint *strides, jint nDims, jint len) |
Checks an array's dimensions and strides. More... | |
static void | assign (JNIEnv *env, ArrayPinHandler::jarray_type type, jarray srcV, jint *srcIndices, jarray dstV, jint *dstIndices, jint nIndices) |
Assigns source values to destination values based on arrays of physical indices. More... | |
static void | map (JNIEnv *env, jobject thisObj, jintArray bounds, jobject srcV, jintArray srcD, jintArray srcS, jobject dstV, jintArray dstD, jintArray dstS) |
Performs a mapping operation. More... | |
static MappingResult * | map (const jint *boundsArr, const jint *srcDArr, const jint *srcSArr, jint srcLen, const jint *dstDArr, const jint *dstSArr, jint dstLen, jint nDims) |
Computes source and destination mapping indices. More... | |
static void | slice (JNIEnv *env, jobject thisObj, jintArray slices, jobject srcV, jintArray srcD, jintArray srcS, jobject dstV, jintArray dstD, jintArray dstS) |
Performs a slicing operation. More... | |
static MappingResult * | slice (const jint *slicesArr, jint nSlices, const jint *srcDArr, const jint *srcSArr, jint srcLen, const jint *dstDArr, const jint *dstSArr, jint dstLen, jint nDims) |
Computes source and destination slicing indices. More... | |
A class for mapping and slicing operations.
|
static |
Assigns source values to destination values based on arrays of physical indices.
env | the JNI environment. |
type | the array type. |
srcV | the source array. |
srcIndices | the source indices. |
dstV | the destination array. |
dstIndices | the destination indices. |
nIndices | the number of indices. |
|
static |
Creates an array of physical indices.
indices | the result array. |
dims | the mapping dimensions. |
strides | the strides. |
nDims | the number of dimensions. |
|
static |
Creates an array of physical slicing indices.
indices | the result array. |
dims | the slicing dimensions. |
strides | the strides. |
nDims | the number of dimensions. |
sliceIndices | the indices to slice on arranged by dimension. |
|
static |
Checks an array's dimensions and strides.
len | the array length. |
dims | the dimensions. |
strides | the strides. |
nDims | the number of dimensions. |
|
static |
Performs a mapping operation.
env | the JNI environment. |
thisObj | this object. |
bounds | the mapping bounds. |
srcV | the source values. |
srcD | the source dimensions. |
srcS | the source strides. |
dstV | the destination values. |
dstD | the destination dimensions. |
dstS | the destination strides. |
|
static |
Computes source and destination mapping indices.
boundsArr | the mapping bounds. |
srcDArr | the source dimensions. |
srcSArr | the source strides. |
srcLen | the number of source values. |
dstDArr | the destination dimensions. |
dstSArr | the destination strides. |
dstLen | the number of destination values. |
nDims | the number of dimensions. |
|
static |
Performs a slicing operation.
env | the JNI environment. |
thisObj | this object. |
slices | the slicing specification. |
srcV | the source values. |
srcD | the source dimensions. |
srcS | the source strides. |
dstV | the destination values. |
dstD | the destination dimensions. |
dstS | the destination strides. |
|
static |
Computes source and destination slicing indices.
slicesArr | the slicing specification. |
nSlices | the number of slices. |
srcDArr | the source dimensions. |
srcSArr | the source strides. |
srcLen | the number of source values. |
dstDArr | the destination dimensions. |
dstSArr | the destination strides. |
dstLen | the number of destination values. |
nDims | the number of dimensions. |