mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Added checks for LDB and LDC in qmckl_distance. #15
This commit is contained in:
parent
43197f390a
commit
1208ddd73b
@ -520,6 +520,7 @@ integer function qmckl_distance_f(context, transa, transb, m, n, &
|
||||
return
|
||||
endif
|
||||
|
||||
! check for LDA
|
||||
if (iand(transab,1) == 0 .and. LDA < 3) then
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
return
|
||||
@ -540,6 +541,33 @@ integer function qmckl_distance_f(context, transa, transb, m, n, &
|
||||
return
|
||||
endif
|
||||
|
||||
! check for LDB
|
||||
if (iand(transab,1) == 0 .and. LDB < 3) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,1) == 1 .and. LDB < n) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,2) == 0 .and. LDB < 3) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,2) == 2 .and. LDB < n) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
! check for LDC
|
||||
if (LDC < m) then
|
||||
info = QMCKL_INVALID_ARG_11
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
select case (transab)
|
||||
|
||||
@ -901,6 +929,7 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
transab = -100
|
||||
endif
|
||||
|
||||
! check for LDA
|
||||
if (transab < 0) then
|
||||
info = QMCKL_INVALID_ARG_1
|
||||
return
|
||||
@ -926,6 +955,33 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
return
|
||||
endif
|
||||
|
||||
! check for LDB
|
||||
if (iand(transab,1) == 0 .and. LDB < 3) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,1) == 1 .and. LDB < n) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,2) == 0 .and. LDB < 3) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
if (iand(transab,2) == 2 .and. LDB < n) then
|
||||
info = QMCKL_INVALID_ARG_9
|
||||
return
|
||||
endif
|
||||
|
||||
! check for LDC
|
||||
if (LDC < m) then
|
||||
info = QMCKL_INVALID_ARG_11
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
select case (transab)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user