Introduce HostAllocationPolicy
commitf9885259b51b0bc7e6c3a7cb24c62b53fd1d1395
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 6 Nov 2017 07:45:49 +0000 (6 08:45 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 9 Nov 2017 02:15:27 +0000 (9 03:15 +0100)
tree8ff1ca389c36716213b3b35ab60f87530ce0b426
parentba0457704fc8dc59c1bf2044b3953666fa2badcc
Introduce HostAllocationPolicy

This permits host-side standard containers and smart pointers to have
their contents placed in memory suitable for efficient GPU transfer.

The behaviour can be configured at run time during simulation setup,
so that if we are not running on a GPU, then none of the buffers that
might be affected actually are. The downside is that all such
containers now have state.

Change-Id: I9367d0f996de04c21312cef2081cc08148f80561
14 files changed:
src/gromacs/gpu_utils/CMakeLists.txt
src/gromacs/gpu_utils/hostallocator.cpp [new file with mode: 0644]
src/gromacs/gpu_utils/hostallocator.cu [new file with mode: 0644]
src/gromacs/gpu_utils/hostallocator.h [new file with mode: 0644]
src/gromacs/gpu_utils/tests/CMakeLists.txt [copied from src/gromacs/gpu_utils/CMakeLists.txt with 54% similarity]
src/gromacs/gpu_utils/tests/devicetransfers.cpp [new file with mode: 0644]
src/gromacs/gpu_utils/tests/devicetransfers.cu [new file with mode: 0644]
src/gromacs/gpu_utils/tests/devicetransfers.h [new file with mode: 0644]
src/gromacs/gpu_utils/tests/devicetransfers_ocl.cpp [new file with mode: 0644]
src/gromacs/gpu_utils/tests/gputest.cpp [new file with mode: 0644]
src/gromacs/gpu_utils/tests/gputest.h [new file with mode: 0644]
src/gromacs/gpu_utils/tests/hostallocator.cpp [new file with mode: 0644]
src/gromacs/utility/allocator.h
src/gromacs/utility/tests/alignedallocator.cpp