Gromacs  2021.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
hostallocator.cpp File Reference
#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/hardware/device_management.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/real.h"
#include "gromacs/math/tests/testarrayrefs.h"
#include "testutils/test_hardware_environment.h"
#include "devicetransfers.h"
#include "gromacs/utility/tests/alignedallocator_impl.h"
+ Include dependency graph for hostallocator.cpp:

Description

Tests for GPU host allocator.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

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 DeviceInformation &deviceInfo, ArrayRef< T > input, ArrayRef< T > output)
 Does a device transfer of input to the device in gpuInfo, and back to output.