//vdDiv		Division of elements of one vector by elements of the second vector
void klVSLDiv(klVector<double>& v,klVector<double>& b, klVector<double>& ans)
{
	vmlSetMode( VML_LA | VML_FTZDAZ_ON | VML_ERRMODE_ERRNO );
	if(v.getColumns() != b.getColumns() )
	{
		ANSI_INFO; throw klError(err + "Range Argument Exception in klVSLSub");
	}
	const __int64_t n = v.getColumns();

	vdDiv( n,  v.getMemory(),b.getMemory(),ans.getMemory());

}
Exemple #2
0
/*
 * Class:     com_intel_analytics_bigdl_mkl_MKL
 * Method:    vdDiv
 * Signature: (I[DI[DI[DI)V
 */
JNIEXPORT void JNICALL Java_com_intel_analytics_bigdl_mkl_MKL_vdDiv
  (JNIEnv * env, jclass cls, jint n, jfloatArray a, jint aOffset, jfloatArray b, jint bOffset,
  jfloatArray y, jint yOffset) {


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

   vdDiv(n, jni_a + aOffset, jni_b + bOffset, jni_y + yOffset);

   (*env)->ReleasePrimitiveArrayCritical(env, y, jni_y, 0);
   (*env)->ReleasePrimitiveArrayCritical(env, b, jni_b, 0);
   (*env)->ReleasePrimitiveArrayCritical(env, a, jni_a, 0);
   }
void caffe_div<double>(const int n, const double* a, const double* b,
                       double* y) {
    vdDiv(n, a, b, y);
}
DLLEXPORT void d_vector_divide( const int n, const double x[], const double y[], double result[] ){
	vdDiv( n, x, y, result );
}