jasonlarkin / p3dfft

Automatically exported from code.google.com/p/p3dfft
GNU General Public License v3.0
0 stars 0 forks source link

Remove preprocessor flag -DDIMS_C? #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- Is the preprocessor flag -DDIMS_C really necessary? I changed the C 
wrappers in file p3dfft.2.3.2/include/p3dfft.h

The idea is taken from FFTW. The fortran setup is called with transposed
dimensions and from a C programmers point of view now columns have 
contiguous memory layout. FFTW uses the same trick in opposite direction 
for its Fortran wrappers. Now the same library can be used for fortran and 
C without double compilation. I also shifted 'start' and 'end' by -1 to get 
C like numbering beginning with 0. Is there any other reason for using the 
precompiler flag -DDIMS_C?

> void p3dfft_setup(int *dims,int nx,int ny,int nz, int overwrite)
> {
>   FORT_MOD_NAME(p3dfft_setup)(dims,&nz,&ny,&nx,&overwrite);
> }
>
> void get_dims(int *start,int *end,int *size,int conf)
> {
>   int hstart[3], hend[3], hsize[3], i;
>   FORT_MOD_NAME(get_dims)(hstart,hend,hsize,&conf);
>
>   for(i=0; i<3; i++){
>     start[i] = hstart[2-i]-1;
>     end[i]   = hend[2-i]-1;
>     size[i]  = hsize[2-i];
>   }
> }

Original issue reported on code.google.com by d4p...@ucsd.edu on 3 Mar 2010 at 1:20

GoogleCodeExporter commented 9 years ago
I could not find the -DDIMS_C flag being used anywhere. It was mentioned in the
comments of a source file.

Original comment by dan.djc...@gmail.com on 11 Mar 2010 at 9:48

GoogleCodeExporter commented 9 years ago
I believe we discussed this and we are going to remove it?

Original comment by dan.djc...@gmail.com on 21 Apr 2010 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by dan.djc...@gmail.com on 7 May 2010 at 1:49