Ejemplo n.º 1
0
//vdSqrt Computation of the square root of vector elements
void klVSLSqrt(klVector<double>& v,klVector<double>& ans)
{
	const __int64_t n = v.getColumns();


	vdSqrt( n,  v.getMemory(),ans.getMemory());

}
Ejemplo n.º 2
0
   /*
    * Class:     com_intel_analytics_bigdl_mkl_MKL
    * Method:    vdSqrt
    * Signature: (I[DI[DI)V
    */
  JNIEXPORT void JNICALL Java_com_intel_analytics_bigdl_mkl_MKL_vdSqrt
     (JNIEnv * env, jclass cls, jint n, jdoubleArray a, jint aOffset, jdoubleArray y,
     jint yOffset) {

     jdouble * jni_a = (*env)->GetPrimitiveArrayCritical(env, a, JNI_FALSE);
     jdouble * jni_y = (*env)->GetPrimitiveArrayCritical(env, y, JNI_FALSE);

     vdSqrt( n, jni_a + aOffset, jni_y + yOffset);

     (*env)->ReleasePrimitiveArrayCritical(env, y, jni_y, 0);
     (*env)->ReleasePrimitiveArrayCritical(env, a, jni_a, 0);
   }