//vzDiv Division of elements of one vector by elements of the second vector void klVSLDiv(klVector< complex<double > >& v,klVector< complex<double> >& b, klVector< complex<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 klVSLDiv"); } // Elementwise equal to the scalar klVector<bool> checkNonZero =( b==complex<double>(0.0f,0.0f)); if(checkNonZero.sum()>0) { std::cerr<<"Warning : divide By zero in klVSLDiv check for Inf in result"<<endl; {ANSI_INFO; throw klError(err + "Divide By Zeroin klSVLDiv");} } const __int64_t n = v.getColumns(); vzDiv( n, v.getMemory(),b.getMemory(),ans.getMemory()); }
DLLEXPORT void z_vector_divide( const int n, const MKL_Complex16 x[], const MKL_Complex16 y[], MKL_Complex16 result[] ){ vzDiv( n, x, y, result ); }