Skip to content

Commit 453f0f9

Browse files
committed
added C++ compatibility
1 parent 28d884b commit 453f0f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/p3dfft.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define FORTNAME(NAME) NAME##_
3434

35-
#elif defined PGI
35+
#elif defined PGI
3636

3737
/* #define FORT_MOD_NAME(NAME) p3dfft_##NAME##_ */
3838

@@ -51,6 +51,10 @@
5151

5252
#endif
5353

54+
#ifdef __cplusplus
55+
extern "C"
56+
{
57+
#endif
5458

5559
extern void FORT_MOD_NAME(p3dfft_setup)(int *dims,int *nx,int *ny,int *nz, int * comm, int *nxc, int *nyc, int *nzc, int *ow, int *memsize);
5660
extern void FORT_MOD_NAME(p3dfft_get_dims)(int *,int *,int *,int *);
@@ -136,3 +140,6 @@ inline void Cp3dfft_btran_c2r(float *A,float *B, unsigned char *op)
136140
}
137141
#endif
138142

143+
#ifdef __cplusplus
144+
}
145+
#endif

0 commit comments

Comments
 (0)