예제 #1
0
CAMLprim value spoc_cublasSrotg (value host_sa, value host_sb, value host_sc, value host_ss){
	CAMLparam4(host_sa, host_sb, host_sc, host_ss);
	CAMLlocal2(bigArray, gi);
	int id;
	enum cudaError_enum cuda_error = 0;
	cublasStatus cublas_error = CUBLAS_STATUS_SUCCESS;
	float* h_A;
	float* h_B;
	float* h_C;
	float* h_D;
	float result;
	GET_HOST_VEC(host_sa, h_A);
	GET_HOST_VEC(host_sb, h_B);
	GET_HOST_VEC(host_sc, h_C);
	GET_HOST_VEC(host_ss, h_D);
	cublasSrotg(h_A, h_B, h_C, h_D);
	CUBLAS_CHECK_CALL(cublasGetError());
	CAMLreturn(Val_unit);
}
예제 #2
0
//
// Overloaded function for dispatching to
// * CUBLAS backend, and
// * float value-type.
//
inline void rotg( float& a, float& b, float& c, float& s ) {
    cublasSrotg( &a, &b, &c, &s );
}