Gromacs
2020.4
|
#include "gmxpre.h"
#include "gromacs/gpu_utils/hostallocator.h"
#include "config.h"
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/real.h"
#include "gromacs/math/tests/testarrayrefs.h"
#include "devicetransfers.h"
#include "gputest.h"
#include "gromacs/utility/tests/alignedallocator_impl.h"
Tests for GPU host allocator.
Classes | |
class | gmx::test::HostMemoryTest< T > |
Typed test fixture for infrastructure for host-side memory used for GPU transfers. More... | |
struct | gmx::test::HostAllocatorTest< T > |
Typed test fixture. More... | |
struct | gmx::test::HostAllocatorTestNoMem< T > |
Typed test fixture (no mem/gpu initializtion - much faster) More... | |
struct | gmx::test::HostAllocatorTestNoMemCopyable< T > |
Typed test fixture for tests requiring a copyable type. More... | |
Typedefs | |
typedef ::testing::Types < int32_t, real, RVec, test::MoveOnly > | gmx::test::TestTypes |
The types used in testing of all operations. | |
using | gmx::test::TestTypesCopyable = ::testing::Types< int32_t, real, RVec > |
The types used in testing minus move only types. | |
template<typename T > | |
using | gmx::test::HostAllocatorTestCopyable = HostAllocatorTest< T > |
Typed test fixture for tests requiring a copyable type. | |
using | gmx::test::AllocatorTypesToTest = ::testing::Types< HostAllocator< real >, HostAllocator< int32_t >, HostAllocator< RVec >, HostAllocator< MoveOnly >> |
Declare allocator types to test. | |
Functions | |
template<typename T > | |
ArrayRef< char > | gmx::test::charArrayRefFromArray (T *data, size_t size) |
Convenience function to transform a view into one with base type of (non-const) char. More... | |
template<typename T > | |
void | gmx::test::runTest (const gmx_gpu_info_t &gpuInfo, ArrayRef< T > input, ArrayRef< T > output) |
Does a device transfer of input to the device in gpuInfo , and back to output . | |
template<typename VectorType > | |
bool | gmx::test::isPinned (const VectorType &v) |
Helper function for wrapping a call to isHostMemoryPinned. | |