22#if defined(HAVE_CLBLAS) || defined(HAVE_CLBLAST)
56 integer,
parameter,
public :: &
60 integer,
parameter,
public :: &
64 integer,
parameter,
public :: &
69 integer,
parameter,
public :: &
72#elif defined(HAVE_CUDA)
73 integer,
parameter,
public :: &
77 integer,
parameter,
public :: &
81 integer,
parameter,
public :: &
86 integer,
parameter,
public :: &
90 integer,
parameter,
public :: &
91 ACCEL_BLAS_LEFT = 0, &
94 integer,
parameter,
public :: &
95 ACCEL_BLAS_LOWER = 0, &
98 integer,
parameter,
public :: &
103 integer,
parameter,
public :: &
104 ACCEL_BLAS_DIAG_NON_UNIT = 0, &
111 subroutine cuda_blas_ddot(handle, n, x, offx, incx, y, offy, incy, res, offres)
113 use,
intrinsic :: iso_fortran_env
117 type(c_ptr),
intent(in) :: handle
118 integer(int64),
intent(in) :: n
119 type(c_ptr),
intent(in) :: x
120 integer(int64),
intent(in) :: offx
121 integer(int64),
intent(in) :: incx
122 type(c_ptr),
intent(in) :: y
123 integer(int64),
intent(in) :: offy
124 integer(int64),
intent(in) :: incy
125 type(c_ptr),
intent(inout) :: res
126 integer(int64),
intent(in) :: offres
129 subroutine cuda_blas_zdotc(handle, n, x, offx, incx, y, offy, incy, res, offres)
131 use,
intrinsic :: iso_fortran_env
135 type(c_ptr),
intent(in) :: handle
136 integer(int64),
intent(in) :: n
137 type(c_ptr),
intent(in) :: x
138 integer(int64),
intent(in) :: offx
139 integer(int64),
intent(in) :: incx
140 type(c_ptr),
intent(in) :: y
141 integer(int64),
intent(in) :: offy
142 integer(int64),
intent(in) :: incy
143 type(c_ptr),
intent(inout) :: res
144 integer(int64),
intent(in) :: offres
147 subroutine cuda_blas_zdotu(handle, n, x, offx, incx, y, offy, incy, res, offres)
149 use,
intrinsic :: iso_fortran_env
153 type(c_ptr),
intent(in) :: handle
154 integer(int64),
intent(in) :: n
155 type(c_ptr),
intent(in) :: x
156 integer(int64),
intent(in) :: offx
157 integer(int64),
intent(in) :: incx
158 type(c_ptr),
intent(in) :: y
159 integer(int64),
intent(in) :: offy
160 integer(int64),
intent(in) :: incy
161 type(c_ptr),
intent(inout) :: res
162 integer(int64),
intent(in) :: offres
170 use,
intrinsic :: iso_fortran_env
174 type(c_ptr),
intent(in) :: handle
175 integer(int64),
intent(in) :: n
176 type(c_ptr),
intent(in) :: x
177 integer(int64),
intent(in) :: offx
178 integer(int64),
intent(in) :: incx
179 type(c_ptr),
intent(inout) :: res
180 integer(int64),
intent(in) :: offres
185 use,
intrinsic :: iso_fortran_env
189 type(c_ptr),
intent(in) :: handle
190 integer(int64),
intent(in) :: n
191 type(c_ptr),
intent(in) :: x
192 integer(int64),
intent(in) :: offx
193 integer(int64),
intent(in) :: incx
194 type(c_ptr),
intent(inout) :: res
195 integer(int64),
intent(in) :: offres
201 subroutine cuda_blas_dgemm(handle, transa, transb, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc)
203 use,
intrinsic :: iso_fortran_env
207 type(c_ptr),
intent(in) :: handle
208 integer,
intent(in) :: transa
209 integer,
intent(in) :: transb
210 integer(int64),
intent(in) :: m
211 integer(int64),
intent(in) :: n
212 integer(int64),
intent(in) :: k
213 type(c_ptr),
intent(in) :: alpha
214 type(c_ptr),
intent(in) :: A
215 integer(int64),
intent(in) :: lda
216 type(c_ptr),
intent(in) :: B
217 integer(int64),
intent(in) :: ldb
218 type(c_ptr),
intent(in) :: beta
219 type(c_ptr),
intent(inout) :: C
220 integer(int64),
intent(in) :: ldc
223 subroutine cuda_blas_zgemm(handle, transa, transb, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc)
225 use,
intrinsic :: iso_fortran_env
229 type(c_ptr),
intent(in) :: handle
230 integer,
intent(in) :: transa
231 integer,
intent(in) :: transb
232 integer(int64),
intent(in) :: m
233 integer(int64),
intent(in) :: n
234 integer(int64),
intent(in) :: k
235 type(c_ptr),
intent(in) :: alpha
236 type(c_ptr),
intent(in) :: A
237 integer(int64),
intent(in) :: lda
238 type(c_ptr),
intent(in) :: B
239 integer(int64),
intent(in) :: ldb
240 type(c_ptr),
intent(in) :: beta
241 type(c_ptr),
intent(inout) :: C
242 integer(int64),
intent(in) :: ldc
249 subroutine cuda_blas_dgemv(handle, transa, m, n, alpha, A, lda, x, incx, beta, y, incy)
251 use,
intrinsic :: iso_fortran_env
255 type(c_ptr),
intent(in) :: handle
256 integer,
intent(in) :: transa
257 integer(int64),
intent(in) :: m
258 integer(int64),
intent(in) :: n
259 type(c_ptr),
intent(in) :: alpha
260 type(c_ptr),
intent(in) :: A
261 integer(int64),
intent(in) :: lda
262 type(c_ptr),
intent(in) :: x
263 integer(int64),
intent(in) :: incx
264 type(c_ptr),
intent(in) :: beta
265 type(c_ptr),
intent(inout) :: y
266 integer(int64),
intent(in) :: incy
269 subroutine cuda_blas_zgemv(handle, transa, m, n, alpha, A, lda, x, incx, beta, y, incy)
271 use,
intrinsic :: iso_fortran_env
275 type(c_ptr),
intent(in) :: handle
276 integer,
intent(in) :: transa
277 integer(int64),
intent(in) :: m
278 integer(int64),
intent(in) :: n
279 type(c_ptr),
intent(in) :: alpha
280 type(c_ptr),
intent(in) :: A
281 integer(int64),
intent(in) :: lda
282 type(c_ptr),
intent(in) :: x
283 integer(int64),
intent(in) :: incx
284 type(c_ptr),
intent(in) :: beta
285 type(c_ptr),
intent(inout) :: y
286 integer(int64),
intent(in) :: incy
291 subroutine cuda_blas_dsyrk(handle, uplo, trans, n, k, alpha, A, lda, beta, C, ldc)
293 use,
intrinsic :: iso_fortran_env
297 type(c_ptr),
intent(in) :: handle
298 integer,
intent(in) :: uplo
299 integer,
intent(in) :: trans
300 integer(int64),
intent(in) :: n
301 integer(int64),
intent(in) :: k
302 type(c_ptr),
intent(in) :: alpha
303 type(c_ptr),
intent(in) :: A
304 integer(int64),
intent(in) :: lda
305 type(c_ptr),
intent(in) :: beta
306 type(c_ptr),
intent(inout) :: C
307 integer(int64),
intent(in) :: ldc
310 subroutine cuda_blas_zherk(handle, uplo, trans, n, k, alpha, A, lda, beta, C, ldc)
312 use,
intrinsic :: iso_fortran_env
316 type(c_ptr),
intent(in) :: handle
317 integer,
intent(in) :: uplo
318 integer,
intent(in) :: trans
319 integer(int64),
intent(in) :: n
320 integer(int64),
intent(in) :: k
321 type(c_ptr),
intent(in) :: alpha
322 type(c_ptr),
intent(in) :: A
323 integer(int64),
intent(in) :: lda
324 type(c_ptr),
intent(in) :: beta
325 type(c_ptr),
intent(inout) :: C
326 integer(int64),
intent(in) :: ldc
332 subroutine cuda_blas_dtrsm(handle, side, uplo, trans, diag, m, n, alpha, A, lda, B, ldb)
334 use,
intrinsic :: iso_fortran_env
338 type(c_ptr),
intent(in) :: handle
339 integer,
intent(in) :: side
340 integer,
intent(in) :: uplo
341 integer,
intent(in) :: trans
342 integer,
intent(in) :: diag
343 integer(int64),
intent(in) :: m
344 integer(int64),
intent(in) :: n
345 type(c_ptr),
intent(in) :: alpha
346 type(c_ptr),
intent(in) :: A
347 integer(int64),
intent(in) :: lda
348 type(c_ptr),
intent(inout) :: B
349 integer(int64),
intent(in) :: ldb
352 subroutine cuda_blas_ztrsm(handle, side, uplo, trans, diag, m, n, alpha, A, lda, B, ldb)
354 use,
intrinsic :: iso_fortran_env
358 type(c_ptr),
intent(in) :: handle
359 integer,
intent(in) :: side
360 integer,
intent(in) :: uplo
361 integer,
intent(in) :: trans
362 integer,
intent(in) :: diag
363 integer(int64),
intent(in) :: m
364 integer(int64),
intent(in) :: n
365 type(c_ptr),
intent(in) :: alpha
366 type(c_ptr),
intent(in) :: A
367 integer(int64),
intent(in) :: lda
368 type(c_ptr),
intent(inout) :: B
369 integer(int64),
intent(in) :: ldb
376#include "complex.F90"
377#include "accel_blas_inc.F90"
381#include "accel_blas_inc.F90"
integer, parameter, public accel_blas_diag_unit
subroutine, public zaccel_trsm(side, uplo, trans, diag, m, n, alpha, a, offa, lda, b, offb, ldb)
subroutine, public daccel_gemv(transa, m, n, alpha, A, lda, x, incx, beta, y, incy)
subroutine, public daccel_gemm(transa, transb, m, n, k, alpha, A, offa, lda, B, offb, ldb, beta, C, offc, ldc)
subroutine, public daccel_dot(n, x, offx, incx, y, offy, incy, res, offres)
subroutine, public daccel_nrm2(n, x, offx, incx, res, offres)
subroutine, public daccel_trsm(side, uplo, trans, diag, m, n, alpha, a, offa, lda, b, offb, ldb)
subroutine, public zaccel_nrm2(n, x, offx, incx, res, offres)
subroutine, public zaccel_gemm(transa, transb, m, n, k, alpha, A, offa, lda, B, offb, ldb, beta, C, offc, ldc)
integer, parameter, public accel_blas_right
subroutine, public daccel_dotu(n, x, offx, incx, y, offy, incy, res, offres)
subroutine, public daccel_herk(uplo, trans, n, k, alpha, a, offa, lda, beta, c, offc, ldc)
subroutine, public zaccel_gemv(transa, m, n, alpha, A, lda, x, incx, beta, y, incy)
subroutine, public zaccel_dotu(n, x, offx, incx, y, offy, incy, res, offres)
integer, parameter, public accel_blas_upper
integer, parameter, public accel_blas_t
integer, parameter, public accel_blas_c
subroutine, public zaccel_herk(uplo, trans, n, k, alpha, a, offa, lda, beta, c, offc, ldc)
subroutine, public zaccel_dot(n, x, offx, incx, y, offy, incy, res, offres)
integer, parameter, public clblasunit
integer, parameter, public clblasupper
integer, parameter, public clblasnonunit
integer, parameter, public clblasleft
integer, parameter, public clblastrans
integer, parameter, public clblaslower
integer, parameter, public clblasright
integer, parameter, public clblasconjtrans
integer, parameter, public clblasnotrans
integer, parameter, public cublas_side_left
integer, parameter, public cublas_fill_mode_upper
integer, parameter, public cublas_op_n
integer, parameter, public cublas_op_c
integer, parameter, public cublas_diag_non_unit
integer, parameter, public cublas_op_t
integer, parameter, public cublas_fill_mode_lower
integer, parameter, public cublas_side_right
integer, parameter, public cublas_diag_unit