void xTrsm<cl_double>:: xTrsm_Function(bool flush) { clblasDtrsm(buffer_.order_, buffer_.side_, buffer_.uplo_, buffer_.trans_a_, buffer_.diag_, buffer_.m_, buffer_.n_, buffer_.alpha_, buffer_.buf_a_, buffer_.offA_, buffer_.lda_, buffer_.buf_b_, buffer_.offB_, buffer_.ldb_, 1, &queue_, 0, NULL, &event_); if(flush==true) { clWaitForEvents(1, &event_); } }
cl_int Dtrsm_internal( cl_env *env, double *a, double *b, double alpha, clblasSide side, clblasTranspose transA, clblasUplo uplo, clblasDiag diag, int ar, int ac, int br, int bc, int size_a, int size_b) { CHECK(clblasSetup()); cl_event events[NEVENTS]; int nevent = 0; cl_mem mem_a = create_mem(env, a, size_a, CL_MEM_READ_ONLY, &(events[nevent++])); cl_mem mem_b = create_mem(env, b, size_b, CL_MEM_READ_WRITE, &(events[nevent++])); cl_int err = clblasDtrsm(clblasColumnMajor, side, uplo, transA, diag, br, bc, alpha, mem_a, 0, ar, mem_b, 0, br, 1, &(env->queues[0]), nevent, events, &(events[nevent])); CHECK(err); events[nevent+1] = *read_mem(env, mem_b, b, size_b, 1, &(events[nevent])); CHECK(clWaitForEvents(1, &(events[nevent+1]))); CHECK(clReleaseMemObject(mem_a)); CHECK(clReleaseMemObject(mem_b)); clblasTeardown(); return CL_SUCCESS; }