Gromacs
2025.0-dev-20241009-5c23d5f
|
#include "gmxpre.h"
#include "gromacs/gpu_utils/hostallocator.h"
#include "config.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/gpu_utils/device_context.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/hardware/device_management.h"
#include "gromacs/math/tests/testarrayrefs.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/real.h"
#include "testutils/test_device.h"
#include "testutils/test_hardware_environment.h"
#include "devicetransfers.h"
#include "gromacs/utility/tests/alignedallocator_impl.h"
Tests for GPU host allocator.
Classes | |
struct | gmx::detail::PaddingTraits< T > |
Traits classes for handling padding for types used with PaddedVector. More... | |
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 DeviceContext &deviceContext, ArrayRef< T > input, ArrayRef< T > output) |
Does a device transfer of input to the device in gpuInfo , and back to output . | |