-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,39 @@ extern "C" int onemklZgemm(syclQueue_t device_queue, onemklTranspose transA, | |
return 0; | ||
} | ||
|
||
extern "C" void onemklDamax(syclQueue_t device_queue, int64_t n, const double *x, int64_t incx, int64_t *result) | ||
{ | ||
//printf("Hello World\n\n"); | ||
printf("n %ld, incx %ld, x %p\n", n, incx, x); | ||
int64_t r=0; | ||
oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, &r); | ||
} | ||
extern "C" void onemklSamax(syclQueue_t device_queue, int64_t n, const float *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, result); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
pengtu
|
||
} | ||
extern "C" void onemklZamax(syclQueue_t device_queue, int64_t n, const double _Complex *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast<const std::complex<double> *>(x), incx, result); | ||
} | ||
extern "C" void onemklCamax(syclQueue_t device_queue, int64_t n, const float _Complex *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast<const std::complex<float> *>(x), incx, result); | ||
} | ||
|
||
extern "C" void onemklDamin(syclQueue_t device_queue, int64_t n, const double *x, int64_t incx, int64_t *result) | ||
{ | ||
//printf("Hello World\n\n"); | ||
//printf("n %ld, incx %ld, x %p\n", n, incx, x); | ||
int64_t r=0; | ||
oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, &r); | ||
} | ||
extern "C" void onemklSamin(syclQueue_t device_queue, int64_t n, const float *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, result); | ||
} | ||
extern "C" void onemklZamin(syclQueue_t device_queue, int64_t n, const double _Complex *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast<const std::complex<double> *>(x), incx, result); | ||
} | ||
extern "C" void onemklCamin(syclQueue_t device_queue, int64_t n, const float _Complex *x, int64_t incx, int64_t *result){ | ||
oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast<const std::complex<float> *>(x), incx, result); | ||
} | ||
|
||
// other | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using oneAPI | ||
using oneAPI.oneMKL | ||
|
||
using LinearAlgebra | ||
|
||
m = 20 | ||
|
||
A = oneArray(rand(Float64, m)) | ||
#maxVal = oneMKL.iamax(m, A) | ||
minVal = oneMKL.iamin(m, A) |
@maleadt: The oneMKL iamax takes a sycl::buffer<int64, 1> &result to return value: https://spec.oneapi.io/versions/1.0-rev-1/elements/oneMKL/source/domains/blas/iamax.html#iamax-buffer-version.
What is the proper way to allocate the result buffer and pass it to oneMKL:
Add @Sarbojit2019