Skip to content

Commit 692cc48

Browse files
committed
deployment: add WITH_ILP64 option
1 parent 4b5a6e6 commit 692cc48

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

config/fypp_deployment.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def pre_process_fypp(args):
4242
kwd.append("-DWITH_QP=True")
4343
if args.with_xdp:
4444
kwd.append("-DWITH_XDP=True")
45+
if args.with_ilp64:
46+
kwd.append("-DWITH_ILP64=True")
4547

4648
optparser = fypp.get_option_parser()
4749
options, leftover = optparser.parse_args(args=kwd)
@@ -140,8 +142,9 @@ def fpm_build(args,unknown):
140142
parser.add_argument("--maxrank",type=int, default=4, help="Set the maximum allowed rank for arrays")
141143
parser.add_argument("--with_qp",action='store_true', help="Include WITH_QP in the command")
142144
parser.add_argument("--with_xdp",action='store_true', help="Include WITH_XDP in the command")
145+
parser.add_argument("--with_ilp64",action='store_true', help="Include WITH_ILP64 to build 64-bit BLAS/LAPACK")
143146
parser.add_argument("--lnumbering",action='store_true', help="Add line numbering in preprocessed files")
144-
parser.add_argument("--deploy_stdlib_fpm",action='store_true', help="create the stdlib-fpm folder")
147+
parser.add_argument("--deploy_stdlib_fpm",action='store_true', help="create the stdlib-fpm folder")
145148
# external libraries arguments
146149
parser.add_argument("--build", action='store_true', help="Build the project")
147150

@@ -162,4 +165,4 @@ def fpm_build(args,unknown):
162165
#==========================================
163166
# build using fpm
164167
if args.build:
165-
fpm_build(args,unknown)
168+
fpm_build(args,unknown)

include/common.fypp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
#:set WITH_XDP = False
1919
#:endif
2020

21+
#! Support for linear algebra with 64-bit integer sizes
22+
#:if not defined("WITH_ILP64")
23+
#:set WITH_ILP64 = False
24+
#:endif
25+
2126
#! Real kinds to be considered during templating
2227
#:set REAL_KINDS = ["sp", "dp"]
2328
#:if WITH_XDP
@@ -75,9 +80,13 @@ $:"s" if cmplx=="c" else "d" if cmplx=="z" else "x" if cmplx=="y" else "q" if cm
7580
#:enddef
7681

7782
#! BLAS/LAPACK/Linear Algebra Integer Kinds
78-
#:set LINALG_INT_KINDS = ["ilp","ilp64"]
83+
#:set LINALG_INT_KINDS = ["ilp"]
84+
#:set LINALG_INT_SUFFIX = [""]
85+
#:if WITH_ILP64
86+
#:set LINALG_INT_KINDS = LINALG_INT_KINDS+["ilp64"]
87+
#:set LINALG_INT_SUFFIX = LINALG_INT_SUFFIX+["_I64"]
88+
#:endif
7989
#:set LINALG_INT_TYPES = ["integer({})".format(k) for k in LINALG_INT_KINDS]
80-
#:set LINALG_INT_SUFFIX = ["","_I64"]
8190
#:set LINALG_INT_KINDS_TYPES = list(zip(LINALG_INT_KINDS, LINALG_INT_TYPES, LINALG_INT_SUFFIX))
8291

8392
#! Complex types to be considered during templating

0 commit comments

Comments
 (0)