Skip to content
Snippets Groups Projects
Commit 4c42bfb4 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

remove unused headers

parent 14b190b0
No related branches found
No related tags found
No related merge requests found
MPICXX = mpicxx
LINKER = mpicxx
DEFINES =
CFLAGS =
CFLAGS = -Wall \
-O2
LIBS = -lfftw3_mpi \
-lfftw3 \
......@@ -14,9 +15,9 @@ src := \
transp.cpp \
field_descriptor.cpp
obj := $(patsubst %.cpp, ./obj/%.cpp.o, ${src})
obj := $(patsubst %.cpp, ./obj/%.o, ${src})
./obj/%.cpp.o: %.cpp
./obj/%.o: %.cpp
${MPICXX} ${DEFINES} \
${CFLAGS} \
-c $^ -o $@
......@@ -28,3 +29,6 @@ transpose_2D: ${obj}
${LIBS} \
${NULL}
clean:
rm ./obj/*.o
rm t2D
#include <stdlib.h>
#include "field_descriptor.hpp"
extern int myrank, nprocs;
field_descriptor::field_descriptor(
int ndims,
......@@ -162,3 +164,13 @@ field_descriptor* field_descriptor::get_transpose()
return new field_descriptor(this->ndims, n, this->mpi_dtype);
}
int resize(
field_descriptor *fi,
fftwf_complex *ai,
field_descriptor *fo,
fftwf_complex *ao)
{
return EXIT_SUCCESS;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <mpi.h>
#include <fftw3-mpi.h>
......@@ -8,11 +5,11 @@
#define __FIELD_DESCRIPTOR__
extern int myrank, nprocs;
class field_descriptor
{
public:
/* data */
int *sizes;
int *subsizes;
int *starts;
......@@ -20,22 +17,48 @@ class field_descriptor
int local_size, full_size;
MPI_Datatype mpi_array_dtype, mpi_dtype;
/* methods */
field_descriptor(
int ndims,
int *n,
MPI_Datatype element_type);
~field_descriptor();
/* io is performed using MPI_File stuff, and our
* own mpi_array_dtype that was defined in the constructor.
* */
int read(
const char *fname,
void *buffer);
int write(
const char *fname,
void *buffer);
/* a function that generates the transposed descriptor.
* don't forget to delete the result once you're done with it.
* the transposed descriptor is useful for io operations.
* */
field_descriptor *get_transpose();
/* we don't actually need the transposed descriptor to perform
* the transpose operation: we only need the in/out fields.
* */
int transpose(
float *input,
float *output);
};
/* given two arrays of the same dimension, we do simple resizes in
* Fourier space: either chop off high modes, or pad with zeros.
* the arrays are assumed to use fftw layout.
* */
int resize(
field_descriptor *fi,
fftwf_complex *ai,
field_descriptor *fo,
fftwf_complex *ao);
#endif//__FIELD_DESCRIPTOR__
#include <stdio.h>
#include <stdlib.h>
#include "field_descriptor.hpp"
int myrank, nprocs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment