Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
c732662c
Commit
c732662c
authored
Apr 03, 2017
by
Andreas Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template for elpa_invert_trm C-interface
parent
aa28e66d
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
125 deletions
+85
-125
Makefile.am
Makefile.am
+2
-0
src/elpa_c_interface.F90
src/elpa_c_interface.F90
+24
-125
src/elpa_invert_trm_c_interface_template.X90
src/elpa_invert_trm_c_interface_template.X90
+59
-0
No files found.
Makefile.am
View file @
c732662c
...
...
@@ -59,6 +59,7 @@ EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
src/elpa_solve_tridi_c_interface_template.X90
\
src/elpa_mult_at_b_c_interface_template.X90
\
src/elpa_mult_ah_b_c_interface_template.X90
\
src/elpa_invert_trm_c_interface_template.X90
\
src/elpa2_bandred_template.X90
\
src/elpa2_symm_matrix_allreduce_real_template.X90
\
src/elpa2_trans_ev_band_to_full_template.X90
\
...
...
@@ -985,6 +986,7 @@ EXTRA_DIST = \
src/elpa_solve_tridi_c_interface_template.X90
\
src/elpa_mult_at_b_c_interface_template.X90
\
src/elpa_mult_ah_b_c_interface_template.X90
\
src/elpa_invert_trm_c_interface_template.X90
\
src/elpa2_tridiag_band_template.X90
\
src/elpa2_trans_ev_band_to_full_template.X90
\
src/elpa2_trans_ev_tridi_to_band_template.X90
\
...
...
src/elpa_c_interface.F90
View file @
c732662c
...
...
@@ -883,38 +883,12 @@
!c> */
!c> int elpa_invert_trm_real_double(int na, double *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_invert_trm_real_wrapper_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
)
&
result
(
success
)
bind
(
C
,
name
=
"elpa_invert_trm_real_double"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_invert_trm_real_double
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
integer
(
kind
=
c_int
),
value
::
wantDebug
integer
(
kind
=
c_int
)
::
success
#ifdef USE_ASSUMED_SIZE
real
(
kind
=
c_double
)
::
a
(
lda
,
*
)
#else
real
(
kind
=
c_double
)
::
a
(
lda
,
matrixCols
)
#endif
logical
::
wantDebugFortran
,
successFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_invert_trm_real_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define REALCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_invert_trm_c_interface_template.X90"
#undef DOUBLE_PRECISION
#undef REALCASE
#ifdef WANT_SINGLE_PRECISION_REAL
...
...
@@ -936,35 +910,13 @@
!c> */
!c> int elpa_invert_trm_real_single(int na, double *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_invert_trm_real_wrapper_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
)
&
result
(
success
)
bind
(
C
,
name
=
"elpa_invert_trm_real_single"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_invert_trm_real_single
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
integer
(
kind
=
c_int
),
value
::
wantDebug
integer
(
kind
=
c_int
)
::
success
real
(
kind
=
c_float
)
::
a
(
lda
,
matrixCols
)
logical
::
wantDebugFortran
,
successFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_invert_trm_real_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define REALCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_invert_trm_c_interface_template.X90"
#undef SINGLE_PRECISION
#undef REALCASE
#endif /* WANT_SINGLE_PRECISION_REAL */
...
...
@@ -986,41 +938,12 @@
!c> */
!c> int elpa_invert_trm_complex_double(int na, double complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_invert_trm_complex_wrapper_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
&
mpi_comm_cols
,
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_invert_trm_complex_double"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_invert_trm_complex_double
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
integer
(
kind
=
c_int
),
value
::
wantDebug
integer
(
kind
=
c_int
)
::
success
#ifdef USE_ASSUMED_SIZE
complex
(
kind
=
c_double_complex
)
::
a
(
lda
,
*
)
#else
complex
(
kind
=
c_double_complex
)
::
a
(
lda
,
matrixCols
)
#endif
logical
::
successFortran
,
wantDebugFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_invert_trm_complex_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
&
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_invert_trm_c_interface_template.X90"
#undef DOUBLE_PRECISION
#undef COMPLEXCASE
#ifdef WANT_SINGLE_PRECISION_COMPLEX
!c> /*
...
...
@@ -1041,37 +964,13 @@
!c> */
!c> int elpa_invert_trm_complex_single(int na, complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_invert_trm_complex_wrapper_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
&
mpi_comm_cols
,
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_invert_trm_complex_single"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_invert_trm_complex_single
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
integer
(
kind
=
c_int
),
value
::
wantDebug
integer
(
kind
=
c_int
)
::
success
complex
(
kind
=
c_float_complex
)
::
a
(
lda
,
matrixCols
)
logical
::
successFortran
,
wantDebugFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_invert_trm_complex_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_invert_trm_c_interface_template.X90"
#undef SINGLE_PRECISION
#undef COMPLEXCASE
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#endif /* WANT_SINGLE_PRECISION_COMPLEX */
...
...
src/elpa_invert_trm_c_interface_template.X90
0 → 100644
View file @
c732662c
function elpa_invert_trm_&
&MATH_DATATYPE&
&_wrapper_&
&PRECISION&
& (na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) &
result(success) bind(C,name="elpa_invert_trm_&
&MATH_DATATYPE&
&_&
&PRECISION&
")
use, intrinsic :: iso_c_binding
use elpa1_auxiliary, only : elpa_invert_trm_&
&MATH_DATATYPE&
&_&
&PRECISION
implicit none
integer(kind=c_int), value :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
integer(kind=c_int), value :: wantDebug
integer(kind=c_int) :: success
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=C_DATATYPE_KIND) :: a(lda,*)
#else
real(kind=C_DATATYPE_KIND) :: a(lda,matrixCols)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef USE_ASSUMED_SIZE
complex(kind=C_DATATYPE_KIND) :: a(lda,*)
#else
complex(kind=C_DATATYPE_KIND) :: a(lda,matrixCols)
#endif
#endif
logical :: wantDebugFortran, successFortran
if (wantDebug .ne. 0) then
wantDebugFortran = .true.
else
wantDebugFortran = .false.
endif
successFortran = elpa_invert_trm_&
&MATH_DATATYPE&
&_&
&PRECISION&
& (na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebugFortran)
if (successFortran) then
success = 1
else
success = 0
endif
end function
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment