Patch object that contain generic patch information.
More...
#include <shamrock/include/shamrock/patch/Patch.hpp>
|
| bool | operator== (const Patch &rhs) const |
| | check if patch equals
|
| |
| void | set_err_mode () |
| | Make the patch in error mode (patch struct that will be flushed on sync)
|
| |
| bool | is_err_mode () const |
| | check if a patch is in error mode
|
| |
| std::array< u64, dim > | get_split_coord () const |
| |
| std::array< Patch, splts_count > | get_split () const |
| |
| template<class T > |
| std::tuple< sycl::vec< T, 3 >, sycl::vec< T, 3 > > | convert_coord (sycl::vec< u64, 3 > src_offset, sycl::vec< T, 3 > divfact, sycl::vec< T, 3 > offset) const |
| | return an open interval of the corresponding patch coordinates given the div & offset
|
| |
| void | override_from_coord (PatchCoord< dim > pc) |
| |
| PatchCoord< dim > | get_coords () const |
| |
| shammath::CoordRange< u64_3 > | get_patch_range () |
| |
|
| static Patch | merge_patch (std::array< Patch, splts_count > patches) |
| |
| template<class T > |
| static bool | is_in_patch_converted (sycl::vec< T, 3 > val, sycl::vec< T, 3 > min_val, sycl::vec< T, 3 > max_val) |
| | check if particle is in the asked range, given the output of @convert_coord
|
| |
|
| static constexpr u32 | dim = 3U |
| | dimension of the patch (only 3 so far)
|
| |
| static constexpr u32 | splts_count = 1U << dim |
| | if a patch splits, this gives the number of childs
|
| |
| static constexpr u32 | err_node_flag = u32_max |
| | value of node_owner_id if the patch is invalid
|
| |
Patch object that contain generic patch information.
Definition at line 33 of file Patch.hpp.
◆ convert_coord()
template<class T >
| std::tuple< sycl::vec< T, 3 >, sycl::vec< T, 3 > > shamrock::patch::Patch::convert_coord |
( |
sycl::vec< u64, 3 > |
src_offset, |
|
|
sycl::vec< T, 3 > |
divfact, |
|
|
sycl::vec< T, 3 > |
offset |
|
) |
| const |
|
inline |
return an open interval of the corresponding patch coordinates given the div & offset
- Template Parameters
-
| T | type to convert coordinates to |
- Parameters
-
- Returns
- std::tuple<sycl::vec<T,3>,sycl::vec<T,3>>
Definition at line 199 of file Patch.hpp.
◆ get_coords()
◆ get_patch_range()
◆ get_split()
| auto shamrock::patch::Patch::get_split |
( |
| ) |
const |
|
inline |
◆ get_split_coord()
| auto shamrock::patch::Patch::get_split_coord |
( |
| ) |
const |
|
inline |
◆ is_err_mode()
| bool shamrock::patch::Patch::is_err_mode |
( |
| ) |
const |
|
inline |
check if a patch is in error mode
- Returns
- true this patch is in error mode it should be flushed out
-
false this patch is not in error mode it is a valid one
Definition at line 119 of file Patch.hpp.
◆ is_in_patch_converted()
template<class T >
| bool shamrock::patch::Patch::is_in_patch_converted |
( |
sycl::vec< T, 3 > |
val, |
|
|
sycl::vec< T, 3 > |
min_val, |
|
|
sycl::vec< T, 3 > |
max_val |
|
) |
| |
|
inlinestatic |
check if particle is in the asked range, given the output of @convert_coord
- Template Parameters
-
- Parameters
-
| val | the value to check against |
| min_val | the min range given by convert_coord |
| max_val | the max range given by convert_coord |
- Returns
- true is in the patch
-
false is not in the patch
Definition at line 210 of file Patch.hpp.
◆ merge_patch()
◆ operator==()
| bool shamrock::patch::Patch::operator== |
( |
const Patch & |
rhs | ) |
const |
|
inline |
check if patch equals
- Parameters
-
- Returns
- true
-
false
Definition at line 174 of file Patch.hpp.
◆ override_from_coord()
| void shamrock::patch::Patch::override_from_coord |
( |
PatchCoord< dim > |
pc | ) |
|
|
inline |
◆ set_err_mode()
| void shamrock::patch::Patch::set_err_mode |
( |
| ) |
|
|
inline |
Make the patch in error mode (patch struct that will be flushed on sync)
Definition at line 111 of file Patch.hpp.
◆ coord_max
| shamrock::patch::Patch::coord_max |
◆ coord_min
| shamrock::patch::Patch::coord_min |
◆ dim
| shamrock::patch::Patch::dim = 3U |
|
staticconstexpr |
dimension of the patch (only 3 so far)
Definition at line 50 of file Patch.hpp.
◆ err_node_flag
| shamrock::patch::Patch::err_node_flag = u32_max |
|
staticconstexpr |
value of node_owner_id if the patch is invalid
Definition at line 56 of file Patch.hpp.
◆ id_patch
| shamrock::patch::Patch::id_patch |
unique key that identify the patch
Definition at line 86 of file Patch.hpp.
◆ load_value
| shamrock::patch::Patch::load_value |
if synchronized contain the load value of the patch
Definition at line 88 of file Patch.hpp.
◆ node_owner_id
| shamrock::patch::Patch::node_owner_id |
node rank owner of this patch
Definition at line 93 of file Patch.hpp.
◆ pack_node_index
| shamrock::patch::Patch::pack_node_index |
this value mean "to pack with index xxx in the global patch table" and not "to pack with id_pach == xxx"
Definition at line 87 of file Patch.hpp.
◆ splts_count
| shamrock::patch::Patch::splts_count = 1U << dim |
|
staticconstexpr |
if a patch splits, this gives the number of childs
Definition at line 54 of file Patch.hpp.
The documentation for this struct was generated from the following file: