shared
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends
Static Public Member Functions | List of all members
NativeArrayKernel Class Reference

A computational kernel for multidimensional array operations. More...

#include <NativeArrayKernel.hpp>

Static Public Member Functions

static jboolean isJintArray (JNIEnv *env, jobject obj)
 Gets whether the given object is of type int[]. More...
 
static jboolean isJdoubleArray (JNIEnv *env, jobject obj)
 Gets whether the given object is of type double[]. More...
 
static jboolean isAssignableFrom (JNIEnv *env, jclass to, jclass from)
 Gets whether one type is assignable from another. More...
 
static jclass getComponentType (JNIEnv *env, jclass clazz)
 Gets the component type of the given array type. More...
 
static jobjectArray newArray (JNIEnv *env, jclass clazz, jint len)
 Creates a Java array of type Object[]. More...
 
static jobject newSparseArrayState (JNIEnv *env, jarray values, jintArray indices, jintArray indirectionOffsets, jintArray indirections)
 Creates a sparse array. More...
 
static ArrayPinHandler::jarray_type getArrayType (JNIEnv *env, jobject srcV, jobject dstV)
 Extracts the common array type. More...
 
static void init (JNIEnv *env)
 Initializes the kernel. More...
 
static void destroy (JNIEnv *env)
 Destroys the kernel. More...
 

Detailed Description

A computational kernel for multidimensional array operations.

Member Function Documentation

void NativeArrayKernel::destroy ( JNIEnv *  env)
static

Destroys the kernel.

Parameters
envthe JNI environment.
ArrayPinHandler::jarray_type NativeArrayKernel::getArrayType ( JNIEnv *  env,
jobject  srcV,
jobject  dstV 
)
static

Extracts the common array type.

Parameters
envthe JNI environment.
srcVthe nominal source values.
dstVthe nominal destination values.
Returns
the common array type.
jclass NativeArrayKernel::getComponentType ( JNIEnv *  env,
jclass  clazz 
)
static

Gets the component type of the given array type.

Parameters
envthe JNI environment.
clazzthe array type.
Returns
the component type.
void NativeArrayKernel::init ( JNIEnv *  env)
static

Initializes the kernel.

Parameters
envthe JNI environment.
jboolean NativeArrayKernel::isAssignableFrom ( JNIEnv *  env,
jclass  to,
jclass  from 
)
static

Gets whether one type is assignable from another.

Parameters
envthe JNI environment.
tothe assignee.
fromthe assigner.
Returns
true if and only if the LHS is a superclass of the RHS.
jboolean NativeArrayKernel::isJdoubleArray ( JNIEnv *  env,
jobject  obj 
)
static

Gets whether the given object is of type double[].

Parameters
envthe JNI environment.
objthe object.
Returns
true if and only if the object is of type double[].
jboolean NativeArrayKernel::isJintArray ( JNIEnv *  env,
jobject  obj 
)
static

Gets whether the given object is of type int[].

Parameters
envthe JNI environment.
objthe object.
Returns
true if and only if the object is of type int[].
jobjectArray NativeArrayKernel::newArray ( JNIEnv *  env,
jclass  clazz,
jint  len 
)
static

Creates a Java array of type Object[].

Parameters
envthe JNI environment.
clazzthe component type.
lenthe length.
Returns
the newly allocated Object array.
jobject NativeArrayKernel::newSparseArrayState ( JNIEnv *  env,
jarray  values,
jintArray  indices,
jintArray  indirectionOffsets,
jintArray  indirections 
)
static

Creates a sparse array.

Parameters
envthe JNI environment.
valuesthe storage array.
indicesthe physical indices.
indirectionOffsetsthe offsets into the indirections.
indirectionsthe indirection indices.
Returns
the sparse array.