Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
mock_value.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
22#include "shambackends/vec.hpp"
23#include <random>
24
25namespace shamalgs::primitives {
26
62 template<class T, class Engine = std::mt19937>
63 T mock_value(Engine &eng, T min_bound, T max_bound);
64
89 template<class T, class Engine = std::mt19937>
90 inline T mock_value(Engine &eng) {
92 return mock_value<T>(eng, Prop::get_min(), Prop::get_max());
93 }
94
95} // namespace shamalgs::primitives
namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
T mock_value(Engine &eng, T min_bound, T max_bound)
Generates a random mock value within specified bounds.