StreamHPC / gromacs

OpenCL porting of the GROMACS molecular simulation toolkit
http://www.gromacs.org
Other
25 stars 4 forks source link

Remove lots of high-level duplication #82

Closed mabraham closed 9 years ago

mabraham commented 9 years ago

src/gromacs/mdlib/nbnxn[cuda,ocl]/nbnxn[cuda,ocl].h is now src/gromacs mdlib/nbnxn_gpu.h (and similarly for data_mgmt.h files)

Renamed some struct members and function names to be neutral with resepct to GPU flavour. Introduced some typedefs so that we can use generic names at higher level and specific names at lower level. Not sure if this will work in the long run, e.g. with doxygen.

Minor enhancements to macro machinery for supporting declaring the three functions.

The above moves the code much closer to "three implementations of the same interface," which we need in order to make a reasonable judgement for whether there is duplication at a lower level that we should remove. Further work of this type probably warranted in gpu_utils.*

Removed src/gromacs/legacyheaders/types/*ext.h in favour of explicit forward declarations of structs.

Renamed various data structures along the lines of new Gromacs standard for C-style structs (ie. struct gmx_some_name_t with no fancy typedefs hiding whether types are structs or pointers to structs).

Moved GPU timing structs to timing module