mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
rename prng to random
This commit is contained in:
parent
c7e57e2fe0
commit
0f6a96fc1b
@ -113,4 +113,4 @@ add_subdirectory(io)
|
||||
add_subdirectory(source)
|
||||
|
||||
#add Pseudo Random Number Generator folder
|
||||
add_subdirectory(prng)
|
||||
add_subdirectory(random)
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include <random>
|
||||
#include <vtkm/cont/ArrayHandleImplicit.h>
|
||||
#include <vtkm/prng/Philox.h>
|
||||
#include <vtkm/random/Philox.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
@ -35,7 +35,7 @@ struct PhiloxFunctor
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::UInt64 operator()(vtkm::Id index) const
|
||||
{
|
||||
using philox_functor = vtkm::prng::philox_functor2x32x10;
|
||||
using philox_functor = vtkm::random::philox_functor2x32x10;
|
||||
using counters_type = typename philox_functor::counters_type;
|
||||
|
||||
// We deliberately use type punning to convert vtkm::Id into counters and then to
|
||||
|
@ -7,14 +7,14 @@
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_prng_Philox_h
|
||||
#define vtk_m_prng_Philox_h
|
||||
#ifndef vtk_m_random_Philox_h
|
||||
#define vtk_m_random_Philox_h
|
||||
|
||||
#include <vtkm/Types.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace prng
|
||||
namespace random
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
@ -132,6 +132,6 @@ public:
|
||||
using philox_functor2x32x7 = detail::philox_functor<vtkm::UInt32, 2, 7, 0xD256D193, 0x9E3779B9>;
|
||||
using philox_functor2x32x10 = detail::philox_functor<vtkm::UInt32, 2, 10, 0xD256D193, 0x9E3779B9>;
|
||||
|
||||
} // namespace prng
|
||||
} // namespace random
|
||||
} // namespace vtkm
|
||||
#endif //vtk_m_prng_Philox_h
|
||||
#endif //vtk_m_random_Philox_h
|
@ -9,12 +9,12 @@
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
#include <vtkm/prng/Philox.h>
|
||||
#include <vtkm/random/Philox.h>
|
||||
|
||||
void TestPhiloxRNG2x32x7()
|
||||
{
|
||||
vtkm::prng::philox_functor2x32x7 f2x32x7;
|
||||
using counters_type = typename vtkm::prng::philox_functor2x32x7::counters_type;
|
||||
vtkm::random::philox_functor2x32x7 f2x32x7;
|
||||
using counters_type = typename vtkm::random::philox_functor2x32x7::counters_type;
|
||||
|
||||
// test cases from original Random123 implementation
|
||||
VTKM_TEST_ASSERT(f2x32x7({}, {}) == counters_type{ 0x257a3673, 0xcd26be2a });
|
||||
@ -26,8 +26,8 @@ void TestPhiloxRNG2x32x7()
|
||||
|
||||
void TestPhiloxRNG2x32x10()
|
||||
{
|
||||
vtkm::prng::philox_functor2x32x10 f2x32x10;
|
||||
using counters_type = typename vtkm::prng::philox_functor2x32x10::counters_type;
|
||||
vtkm::random::philox_functor2x32x10 f2x32x10;
|
||||
using counters_type = typename vtkm::random::philox_functor2x32x10::counters_type;
|
||||
|
||||
// test cases from original Random123 implementation
|
||||
VTKM_TEST_ASSERT(f2x32x10({}, {}) == counters_type{ 0xff1dae59, 0x6cd10df2 });
|
Loading…
Reference in New Issue
Block a user