49 logical :: plasma_initialized = .false.
50 integer,
parameter :: sp = kind(0.0)
51 integer,
parameter :: dp = kind(0.0d0)
56 & bind(c, name=
'PLASMA_Init')
60 integer(kind=c_int), value :: cores
67 & bind(c, name=
'PLASMA_Finalize')
77 & bind(c, name=
'PLASMA_Set')
81 integer(kind=c_int), value :: param
82 integer(kind=c_int), value :: pval
89 & bind(c, name=
'PLASMA_Get')
93 integer(kind=c_int), value :: param
94 type(c_ptr
), value :: pval
101 & bind(c, name=
'PLASMA_Enable')
105 integer(kind=c_int), value :: param
112 & bind(c, name=
'PLASMA_Disable')
116 integer(kind=c_int), value :: param
123 & bind(c, name=
'PLASMA_Lapack_to_Tile')
126 type(c_ptr
), value :: a_lpk, a_pma
127 integer(kind=c_int), value :: lda
134 & bind(c, name=
'PLASMA_Tile_to_Lapack')
137 type(c_ptr
), value :: a_lpk, a_pma
138 integer(kind=c_int), value :: lda
144 function plasma_desc_create_c(desc, mat, dtyp, mb, nb, bsiz, lm, ln, i, j, m, n) &
145 & bind(c, name=
'PLASMA_Desc_Create')
149 type(c_ptr
), value :: mat
150 integer(kind=c_int), value :: dtyp
151 integer(kind=c_int), value :: mb, nb, bsiz, lm, ln, i, j, m, n
158 & bind(c, name=
'PLASMA_Desc_Destroy')
167 subroutine free_c(ptr) bind(c, name='free')
170 type(c_ptr
), value :: ptr
200 integer(kind=c_int),
intent(in) :: ncores
201 integer(kind=c_int),
intent(out) :: info
203 plasma_initialized = .true.
209 integer(kind=c_int),
intent(out) :: info
211 plasma_initialized = .false.
217 integer(kind=c_int),
intent(in) :: param
218 integer(kind=c_int),
intent(in) :: pval
219 integer(kind=c_int),
intent(out) :: info
226 integer(kind=c_int),
intent(in) :: param
227 integer(kind=c_int),
intent(out),
target :: pval
228 integer(kind=c_int),
intent(out) :: info
235 integer(kind=c_int),
intent(in) :: param
236 integer(kind=c_int),
intent(out) :: info
243 integer(kind=c_int),
intent(in) :: param
244 integer(kind=c_int),
intent(out) :: info
252 integer(kind=c_int),
intent(in) :: lda
253 real(kind=sp),
intent(out),
target :: a_lpk(lda,*)
254 type(c_ptr
),
intent(out) :: a_pma
255 integer(kind=c_int),
intent(out) :: info
262 integer(kind=c_int),
intent(in) :: lda
263 real(kind=dp),
intent(out),
target :: a_lpk(lda,*)
264 type(c_ptr
),
intent(out) :: a_pma
265 integer(kind=c_int),
intent(out) :: info
272 integer(kind=c_int),
intent(in) :: lda
273 complex(kind=sp),
intent(out),
target :: a_lpk(lda,*)
274 type(c_ptr
),
intent(out) :: a_pma
275 integer(kind=c_int),
intent(out) :: info
282 integer(kind=c_int),
intent(in) :: lda
283 complex(kind=dp),
intent(out),
target :: a_lpk(lda,*)
284 type(c_ptr
),
intent(out) :: a_pma
285 integer(kind=c_int),
intent(out) :: info
293 integer(kind=c_int),
intent(in) :: lda
294 real(kind=sp),
intent(out),
target :: a_lpk(lda,*)
295 type(c_ptr
),
intent(in) :: a_pma
296 integer(kind=c_int),
intent(out) :: info
303 integer(kind=c_int),
intent(in) :: lda
304 real(kind=dp),
intent(out),
target :: a_lpk(lda,*)
305 type(c_ptr
),
intent(in) :: a_pma
306 integer(kind=c_int),
intent(out) :: info
313 integer(kind=c_int),
intent(in) :: lda
314 complex(kind=sp),
intent(out),
target :: a_lpk(lda,*)
315 type(c_ptr
),
intent(in) :: a_pma
316 integer(kind=c_int),
intent(out) :: info
323 integer(kind=c_int),
intent(in) :: lda
324 complex(kind=dp),
intent(out),
target :: a_lpk(lda,*)
325 type(c_ptr
),
intent(in) :: a_pma
326 integer(kind=c_int),
intent(out) :: info
331 subroutine plasma_desc_create_s(desc,mat,dtyp,mb,nb,bsiz,lm,ln,i,j,m,n,info)
334 type(c_ptr
),
intent(out) :: desc
335 integer(kind=c_int),
intent(in) :: mb, nb, bsiz, lm, ln, i, j, m, n
336 real(kind=sp),
intent(in),
target :: mat(lm,*)
337 integer(kind=c_int),
intent(in) :: dtyp
338 integer(kind=c_int),
intent(out) :: info
339 info =
plasma_desc_create_c(desc,c_loc(mat),dtyp,mb,nb,bsiz,lm,ln,i,j,m,n)
342 subroutine plasma_desc_create_d(desc,mat,dtyp,mb,nb,bsiz,lm,ln,i,j,m,n,info)
345 type(c_ptr
),
intent(out) :: desc
346 integer(kind=c_int),
intent(in) :: mb, nb, bsiz, lm, ln, i, j, m, n
347 real(kind=dp),
intent(in),
target :: mat(lm,*)
348 integer(kind=c_int),
intent(in) :: dtyp
349 integer(kind=c_int),
intent(out) :: info
350 info =
plasma_desc_create_c(desc,c_loc(mat),dtyp,mb,nb,bsiz,lm,ln,i,j,m,n)
353 subroutine plasma_desc_create_cpx(desc,mat,dtyp,mb,nb,bsiz,lm,ln,i,j,m,n,info)
356 type(c_ptr
),
intent(out) :: desc
357 integer(kind=c_int),
intent(in) :: mb, nb, bsiz, lm, ln, i, j, m, n
358 complex(kind=sp),
intent(in),
target :: mat(lm,*)
359 integer(kind=c_int),
intent(in) :: dtyp
360 integer(kind=c_int),
intent(out) :: info
361 info =
plasma_desc_create_c(desc,c_loc(mat),dtyp,mb,nb,bsiz,lm,ln,i,j,m,n)
364 subroutine plasma_desc_create_z(desc,mat,dtyp,mb,nb,bsiz,lm,ln,i,j,m,n,info)
367 type(c_ptr
),
intent(out) :: desc
368 integer(kind=c_int),
intent(in) :: mb, nb, bsiz, lm, ln, i, j, m, n
369 complex(kind=dp),
intent(in),
target :: mat(lm,*)
370 integer(kind=c_int),
intent(in) :: dtyp
371 integer(kind=c_int),
intent(out) :: info
372 info =
plasma_desc_create_c(desc,c_loc(mat),dtyp,mb,nb,bsiz,lm,ln,i,j,m,n)
378 type(c_ptr
),
intent(inout) :: desc
379 real(kind=sp),
intent(out) :: info
386 type(c_ptr
),
intent(in) :: ptr