mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 09:59:12 +00:00
89e19ce7fa
1. The code now works without CUDA_LAUNCH_BLOCKING set by using explicit synchronizations where required. 2. The code has also been modified to use thread specific memory spaces, which for Kokkos' Cuda backend means per thread streams.
36 lines
943 B
C++
36 lines
943 B
C++
//============================================================================
|
|
// Copyright (c) Kitware, Inc.
|
|
// All rights reserved.
|
|
// See LICENSE.txt for details.
|
|
//
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
//============================================================================
|
|
#ifndef vtk_m_cont_kokkos_internal_KokkosAlloc_h
|
|
#define vtk_m_cont_kokkos_internal_KokkosAlloc_h
|
|
|
|
#include <vtkm/cont/vtkm_cont_export.h>
|
|
|
|
#include <cstddef>
|
|
|
|
namespace vtkm
|
|
{
|
|
namespace cont
|
|
{
|
|
namespace kokkos
|
|
{
|
|
namespace internal
|
|
{
|
|
|
|
VTKM_CONT_EXPORT void* Allocate(std::size_t size);
|
|
VTKM_CONT_EXPORT void Free(void* ptr);
|
|
VTKM_CONT_EXPORT void* Reallocate(void* ptr, std::size_t newSize);
|
|
|
|
}
|
|
}
|
|
}
|
|
} // vtkm::cont::kokkos::internal
|
|
|
|
#endif // vtk_m_cont_kokkos_internal_KokkosAlloc_h
|