static int sdot( size_t N, gpudata *X, size_t offX, size_t incX, gpudata *Y, size_t offY, size_t incY, gpudata *Z, size_t offZ) { cl_ctx *ctx = X->ctx; StatusCode err; cl_event ev; ARRAY_INIT(X); ARRAY_INIT(Y); ARRAY_INIT(Z); err = CLBlastSdot( N, Z->buf, offZ, X->buf, offX, incX, Y->buf, offY, incY, &ctx->q, &ev); if (err != kSuccess) return GA_BLAS_ERROR; ARRAY_FINI(X); ARRAY_FINI(Y); ARRAY_FINI(Z); clReleaseEvent(ev); return GA_NO_ERROR; }
static int sdot( size_t N, gpudata *X, size_t offX, size_t incX, gpudata *Y, size_t offY, size_t incY, gpudata *Z, size_t offZ) { cl_ctx *ctx = X->ctx; cl_event ev; ARRAY_INIT(X); ARRAY_INIT(Y); ARRAY_INIT(Z); CLBT_CHECK(ctx->err, CLBlastSdot(N, Z->buf, offZ, X->buf, offX, incX, Y->buf, offY, incY, &ctx->q, &ev)); ARRAY_FINI(X); ARRAY_FINI(Y); ARRAY_FINI(Z); clReleaseEvent(ev); return GA_NO_ERROR; }