Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libiconmath
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libiconmath
Commits
ffca8a6d
Commit
ffca8a6d
authored
3 months ago
by
Pradipta Samanta
Browse files
Options
Downloads
Patches
Plain Diff
enabled the use of cpp bindings for mo_lib_loopindices
parent
0a4a1ee4
No related branches found
Branches containing commit
No related tags found
1 merge request
!37
Draft: C++ port of horizontal/mo_lib_gradients.F90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
src/support/CMakeLists.txt
+4
-0
4 additions, 0 deletions
src/support/CMakeLists.txt
src/support/mo_lib_loopindices.F90
+33
-1
33 additions, 1 deletion
src/support/mo_lib_loopindices.F90
with
38 additions
and
1 deletion
CMakeLists.txt
+
1
−
0
View file @
ffca8a6d
...
@@ -23,6 +23,7 @@ option(BUILD_ICONMATH_HORIZONTAL "Build horizontal library" ON)
...
@@ -23,6 +23,7 @@ option(BUILD_ICONMATH_HORIZONTAL "Build horizontal library" ON)
option
(
IM_ENABLE_MIXED_PRECISION
"Enable mixed precision"
OFF
)
option
(
IM_ENABLE_MIXED_PRECISION
"Enable mixed precision"
OFF
)
option
(
IM_ENABLE_LOOP_EXCHANGE
"Enable loop exchange"
OFF
)
option
(
IM_ENABLE_LOOP_EXCHANGE
"Enable loop exchange"
OFF
)
option
(
IM_USE_CPP_BINDINGS
"Use C++ bindings"
OFF
)
option
(
IM_ENABLE_DIM_SWAP
"Enable dimension swap"
OFF
)
option
(
IM_ENABLE_DIM_SWAP
"Enable dimension swap"
OFF
)
option
(
IM_ENABLE_OPENACC
"Enable OpenACC support"
OFF
)
option
(
IM_ENABLE_OPENACC
"Enable OpenACC support"
OFF
)
option
(
IM_ENABLE_OPENMP
"Enable OpenMP support"
OFF
)
option
(
IM_ENABLE_OPENMP
"Enable OpenMP support"
OFF
)
...
...
This diff is collapsed.
Click to expand it.
src/support/CMakeLists.txt
+
4
−
0
View file @
ffca8a6d
...
@@ -41,6 +41,10 @@ if(IM_ENABLE_DIM_SWAP)
...
@@ -41,6 +41,10 @@ if(IM_ENABLE_DIM_SWAP)
target_compile_definitions
(
iconmath-support PRIVATE __SWAPDIM
)
target_compile_definitions
(
iconmath-support PRIVATE __SWAPDIM
)
endif
()
endif
()
if
(
IM_USE_CPP_BINDINGS
)
target_compile_definitions
(
iconmath-support PRIVATE __USE_CPP_BINDINGS
)
endif
()
if
(
IM_ENABLE_OPENACC
)
if
(
IM_ENABLE_OPENACC
)
# If _OPENACC is defined, assume that the required compiler flags are already
# If _OPENACC is defined, assume that the required compiler flags are already
# provided, e.g. in CMAKE_Fortran_FLAGS:
# provided, e.g. in CMAKE_Fortran_FLAGS:
...
...
This diff is collapsed.
Click to expand it.
src/support/mo_lib_loopindices.F90
+
33
−
1
View file @
ffca8a6d
...
@@ -16,12 +16,18 @@
...
@@ -16,12 +16,18 @@
MODULE
mo_lib_loopindices
MODULE
mo_lib_loopindices
#ifdef __USE_CPP_BINDINGS
USE
,
INTRINSIC
::
ISO_C_BINDING
#endif
IMPLICIT
NONE
IMPLICIT
NONE
PRIVATE
PRIVATE
PUBLIC
::
get_indices_c_lib
,
get_indices_e_lib
,
get_indices_v_lib
PUBLIC
::
get_indices_c_lib
,
get_indices_e_lib
,
get_indices_v_lib
#ifndef __USE_CPP_BINDINGS
CONTAINS
CONTAINS
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
...
@@ -121,5 +127,31 @@ CONTAINS
...
@@ -121,5 +127,31 @@ CONTAINS
END
SUBROUTINE
get_indices_v_lib
END
SUBROUTINE
get_indices_v_lib
END
MODULE
mo_lib_loopindices
#else
INTERFACE
SUBROUTINE
get_indices_c_lib
(
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
,
&
i_startidx_out
,
i_endidx_out
)
BIND
(
C
,
NAME
=
"get_indices_c_lib"
)
IMPORT
::
C_INT
INTEGER
(
C_INT
),
VALUE
::
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
INTEGER
(
C_INT
)
::
i_startidx_out
,
i_endidx_out
END
SUBROUTINE
get_indices_c_lib
SUBROUTINE
get_indices_e_lib
(
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
,
&
i_startidx_out
,
i_endidx_out
)
BIND
(
C
,
NAME
=
"get_indices_e_lib"
)
IMPORT
::
C_INT
INTEGER
(
C_INT
),
VALUE
::
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
INTEGER
(
C_INT
)
::
i_startidx_out
,
i_endidx_out
END
SUBROUTINE
get_indices_e_lib
SUBROUTINE
get_indices_v_lib
(
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
,
&
i_startidx_out
,
i_endidx_out
)
BIND
(
C
,
NAME
=
"get_indices_v_lib"
)
IMPORT
::
C_INT
INTEGER
(
C_INT
),
VALUE
::
i_startidx_in
,
i_endidx_in
,
nproma
,
i_blk
,
i_startblk
,
i_endblk
INTEGER
(
C_INT
)
::
i_startidx_out
,
i_endidx_out
END
SUBROUTINE
get_indices_v_lib
END
INTERFACE
#endif
END
MODULE
mo_lib_loopindices
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment