![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Public Types | |
| using | Field_type = T |
Public Member Functions | |
| PatchDataField (PatchDataField &&other) noexcept | |
| PatchDataField & | operator= (PatchDataField &&other) noexcept |
| PatchDataField (std::string name, u32 nvar) | |
| PatchDataField (std::string name, u32 nvar, u32 obj_cnt) | |
| PatchDataField (const PatchDataField &other) | |
| PatchDataField (sham::DeviceBuffer< T > &&moved_buf, std::string name, u32 nvar) | |
| PatchDataField (sycl::buffer< T > &&moved_buf, u32 obj_cnt, std::string name, u32 nvar) | |
| PatchDataField & | operator= (const PatchDataField &other)=delete |
| PatchDataField | duplicate () const |
| PatchDataField | duplicate (std::string new_name) const |
| std::unique_ptr< PatchDataField > | duplicate_to_ptr () const |
| sham::DeviceBuffer< T > & | get_buf () |
| const sham::DeviceBuffer< T > & | get_buf () const |
| bool | is_empty () const |
| u64 | memsize () const |
| const u32 & | get_nvar () const |
| u32 | get_obj_cnt () const |
| u32 | get_val_cnt () const |
| Get the number of values stored in the field. | |
| const std::string & | get_name () const |
| void | resize (u32 new_obj_cnt) |
| void | reserve (u32 new_obj_cnt) |
| void | expand (u32 obj_to_add) |
| void | shrink (u32 obj_to_rem) |
| void | insert_element (T v) |
| void | apply_offset (T off) |
| void | insert (const PatchDataField< T > &f2) |
| void | overwrite (const PatchDataField< T > &f2, u32 obj_cnt) |
| void | overwrite (const sham::DeviceBuffer< T > &f2, u32 len) |
| void | override (sycl::buffer< T > &data, u32 cnt) |
| void | override (std::vector< T > &data, u32 cnt) |
| void | override (const T val) |
| void | synchronize_buf () |
| std::vector< T > | copy_to_stdvec () |
| template<u32 nvar, bool is_pointer_access = shamrock::access_t_span> | |
| shamrock::PatchDataFieldSpan< T, nvar, is_pointer_access > | get_span () |
| Returns a shamrock::PatchDataFieldSpan pointing to the current PatchDataField. | |
| shamrock::PatchDataFieldSpan< T, shamrock::dynamic_nvar > | get_span_nvar_dynamic () |
| Returns a shamrock::PatchDataFieldSpan pointing to the current PatchDataField. | |
| shamrock::PatchDataFieldSpan< T, shamrock::dynamic_nvar, shamrock::access_t_pointer > | get_pointer_span () |
| template<class Lambdacd , class... Args> | |
| std::set< u32 > | get_ids_set_where (Lambdacd &&cd_true, Args... args) |
| Get the ids set where object. | |
| template<class Lambdacd , class... Args> | |
| std::vector< u32 > | get_ids_vec_where (Lambdacd &&cd_true, Args &&...args) |
| Same function as. | |
| template<class Lambdacd , class... Args> | |
| std::tuple< std::optional< sycl::buffer< u32 > >, u32 > | get_ids_buf_where (Lambdacd &&cd_true, Args... args) |
| Same function as. | |
| template<class Lambdacd , class... Args> | |
| sham::DeviceBuffer< u32 > | get_ids_where_recycle_buffer (sham::DeviceBuffer< u32 > &mask, Lambdacd &&cd_true, Args... args) const |
| template<class Lambdacd , class... Args> | |
| sham::DeviceBuffer< u32 > | get_ids_where (Lambdacd &&cd_true, Args... args) const |
| Same function as. | |
| template<class Lambdacd > | |
| std::vector< u32 > | get_elements_with_range (Lambdacd &&cd_true, T vmin, T vmax) |
| template<class LambdaCd > | |
| std::tuple< std::optional< sycl::buffer< u32 > >, u32 > | get_elements_in_half_open (T vmin, T vmax) |
| Get the indices of the elements in half open interval. | |
| template<class Lambdacd > | |
| std::unique_ptr< sycl::buffer< u32 > > | get_elements_with_range_buf (Lambdacd &&cd_true, T vmin, T vmax) |
| template<class Lambdacd > | |
| void | check_err_range (Lambdacd &&cd_true, T vmin, T vmax, std::string add_log="") |
| void | extract_element (u32 pidx, PatchDataField< T > &to) |
| void | extract_elements (const sham::DeviceBuffer< u32 > &idxs, PatchDataField< T > &to) |
| bool | check_field_match (PatchDataField< T > &f2) |
| void | field_raz () |
| void | append_subset_to (const std::vector< u32 > &idxs, PatchDataField &pfield) |
| Copy all objects in idxs to pfield. | |
| void | append_subset_to (sycl::buffer< u32 > &idxs_buf, u32 sz, PatchDataField &pfield) |
| void | append_subset_to (const sham::DeviceBuffer< u32 > &idxs_buf, u32 sz, PatchDataField &pfield) const |
| PatchDataField | make_new_from_subset (sycl::buffer< u32 > &idxs_buf, u32 sz) |
| PatchDataField | make_new_from_subset (sham::DeviceBuffer< u32 > &idxs_buf, u32 sz) |
| void | gen_mock_data (u32 obj_cnt, std::mt19937 &eng) |
| void | index_remap (sham::DeviceBuffer< u32 > &index_map, u32 len) |
| this function remaps the patchdatafield like so val[id] = val[index_map[id]] index map describe : at index i, we will have the value that was at index_map[i] | |
| void | permut_vars (const std::vector< u32 > &permut) |
| permut the variables of the field according to the permut | |
| void | index_remap_resize (sham::DeviceBuffer< u32 > &index_map, u32 len) |
| this function remaps the patchdatafield like so val[id] = val[index_map[id]] index map describe : at index i, we will have the value that was at index_map[i] This function will resize the current field to the specified length | |
| void | remove_ids (const sham::DeviceBuffer< u32 > &indexes, u32 len) |
| remove the ids from the field | |
| void | serialize_buf (shamalgs::SerializeHelper &serializer) |
| minimal serialization assuming the user know the layout of the field | |
| shamalgs::SerializeSize | serialize_buf_byte_size () |
| record the size usage of the serialization using serialize_buf | |
| void | serialize_full (shamalgs::SerializeHelper &serializer) |
| serialize everything in the class | |
| shamalgs::SerializeSize | serialize_full_byte_size () |
| give the size usage of serialize_full | |
| T | compute_max () const |
| T | compute_min () const |
| T | compute_sum () const |
| shambase::VecComponent< T > | compute_dot_sum () |
| bool | has_nan () |
| bool | has_inf () |
| bool | has_nan_or_inf () |
Static Public Member Functions | |
| static PatchDataField | deserialize_buf (shamalgs::SerializeHelper &serializer, std::string field_name, u32 nvar) |
| deserialize a field inverse of serialize_buf | |
| static PatchDataField | deserialize_full (shamalgs::SerializeHelper &serializer) |
| deserialize a field inverse of serialize_full | |
| static PatchDataField< T > | mock_field (u64 seed, u32 obj_cnt, std::string name, u32 nvar) |
| static PatchDataField< T > | mock_field (u64 seed, u32 obj_cnt, std::string name, u32 nvar, T vmin, T vmax) |
Definition at line 43 of file PatchDataField.hpp.
| using PatchDataField< T >::Field_type = T |
Definition at line 112 of file PatchDataField.hpp.
|
inlinenoexcept |
Definition at line 98 of file PatchDataField.hpp.
|
inline |
Definition at line 114 of file PatchDataField.hpp.
|
inline |
Definition at line 120 of file PatchDataField.hpp.
|
inline |
Definition at line 126 of file PatchDataField.hpp.
|
inline |
Definition at line 131 of file PatchDataField.hpp.
|
inline |
Definition at line 136 of file PatchDataField.hpp.
| void PatchDataField< T >::append_subset_to | ( | const sham::DeviceBuffer< u32 > & | idxs_buf, |
| u32 | sz, | ||
| PatchDataField< T > & | pfield | ||
| ) | const |
Definition at line 127 of file PatchDataField.cpp.
| void PatchDataField< T >::append_subset_to | ( | const std::vector< u32 > & | idxs, |
| PatchDataField< T > & | pfield | ||
| ) |
Copy all objects in idxs to pfield.
| idxs | |
| pfield |
Definition at line 159 of file PatchDataField.cpp.
Here is the call graph for this function:| void PatchDataField< T >::append_subset_to | ( | sycl::buffer< u32 > & | idxs_buf, |
| u32 | sz, | ||
| PatchDataField< T > & | pfield | ||
| ) |
Definition at line 148 of file PatchDataField.cpp.
| void PatchDataField< T >::apply_offset | ( | T | off | ) |
Definition at line 203 of file PatchDataField.cpp.
|
inline |
Definition at line 734 of file PatchDataField.hpp.
| bool PatchDataField< T >::check_field_match | ( | PatchDataField< T > & | f2 | ) |
Definition at line 112 of file PatchDataField.cpp.
| shambase::VecComponent< T > PatchDataField< T >::compute_dot_sum | ( | ) |
Definition at line 484 of file PatchDataField.cpp.
| T PatchDataField< T >::compute_max | ( | ) | const |
Definition at line 451 of file PatchDataField.cpp.
| T PatchDataField< T >::compute_min | ( | ) | const |
Definition at line 462 of file PatchDataField.cpp.
| T PatchDataField< T >::compute_sum | ( | ) | const |
Definition at line 473 of file PatchDataField.cpp.
|
inline |
Definition at line 228 of file PatchDataField.hpp.
|
static |
deserialize a field inverse of serialize_buf
| serializer | |
| field_name | |
| nvar |
Definition at line 401 of file PatchDataField.cpp.
|
static |
deserialize a field inverse of serialize_full
| serializer |
Definition at line 440 of file PatchDataField.cpp.
|
inline |
Definition at line 149 of file PatchDataField.hpp.
|
inline |
Definition at line 154 of file PatchDataField.hpp.
|
inline |
Definition at line 161 of file PatchDataField.hpp.
|
inline |
Definition at line 611 of file PatchDataField.hpp.
| void PatchDataField< T >::extract_element | ( | u32 | pidx, |
| PatchDataField< T > & | to | ||
| ) |
Definition at line 46 of file PatchDataField.cpp.
| void PatchDataField< T >::extract_elements | ( | const sham::DeviceBuffer< u32 > & | idxs, |
| PatchDataField< T > & | to | ||
| ) |
Definition at line 100 of file PatchDataField.cpp.
|
inline |
Definition at line 464 of file PatchDataField.hpp.
|
inline |
Definition at line 166 of file PatchDataField.hpp.
|
inline |
Definition at line 167 of file PatchDataField.hpp.
| std::tuple< std::optional< sycl::buffer< u32 > >, u32 > PatchDataField< T >::get_elements_in_half_open | ( | T | vmin, |
| T | vmax | ||
| ) |
Get the indices of the elements in half open interval.
| LambdaCd |
| vmin | |
| vmax |
|
inline |
Definition at line 659 of file PatchDataField.hpp.
|
inline |
Definition at line 708 of file PatchDataField.hpp.
|
inline |
Same function as.
| Lambdacd | |
| Args |
| cd_true | |
| args |
Definition at line 333 of file PatchDataField.hpp.
Here is the call graph for this function:
|
inline |
Get the ids set where object.
| Lambdacd | |
| Args |
| cd_true | |
| args |
Definition at line 281 of file PatchDataField.hpp.
|
inline |
Same function as.
| Lambdacd | |
| Args |
| cd_true | |
| args |
Definition at line 307 of file PatchDataField.hpp.
|
inline |
Same function as.
| Lambdacd | |
| Args |
| cd_true | |
| args |
Definition at line 405 of file PatchDataField.hpp.
Here is the call graph for this function:
|
inline |
Definition at line 367 of file PatchDataField.hpp.
|
inline |
Definition at line 199 of file PatchDataField.hpp.
|
inline |
Definition at line 173 of file PatchDataField.hpp.
|
inline |
Definition at line 175 of file PatchDataField.hpp.
|
inline |
Definition at line 262 of file PatchDataField.hpp.
|
inline |
Returns a shamrock::PatchDataFieldSpan pointing to the current PatchDataField.
| nvar | The number of variables in the span. |
Definition at line 245 of file PatchDataField.hpp.
|
inline |
Returns a shamrock::PatchDataFieldSpan pointing to the current PatchDataField.
Definition at line 256 of file PatchDataField.hpp.
|
inline |
Get the number of values stored in the field.
This function was introduced to replace the legacy one size() which could be confused with the of the buffer, which is not required to be the same.
Definition at line 195 of file PatchDataField.hpp.
Here is the call graph for this function:| bool PatchDataField< T >::has_inf | ( | ) |
Definition at line 502 of file PatchDataField.cpp.
| bool PatchDataField< T >::has_nan | ( | ) |
Definition at line 494 of file PatchDataField.cpp.
| bool PatchDataField< T >::has_nan_or_inf | ( | ) |
Definition at line 510 of file PatchDataField.cpp.
| void PatchDataField< T >::index_remap | ( | sham::DeviceBuffer< u32 > & | index_map, |
| u32 | len | ||
| ) |
this function remaps the patchdatafield like so val[id] = val[index_map[id]] index map describe : at index i, we will have the value that was at index_map[i]
This function can be used to apply the result of a sort to the field
| index_map | |
| len | the length of the map (must match with the current count) |
Definition at line 253 of file PatchDataField.cpp.
Here is the call graph for this function:| void PatchDataField< T >::index_remap_resize | ( | sham::DeviceBuffer< u32 > & | index_map, |
| u32 | len | ||
| ) |
this function remaps the patchdatafield like so val[id] = val[index_map[id]] index map describe : at index i, we will have the value that was at index_map[i] This function will resize the current field to the specified length
This function can be used to apply the result of a sort to the field
| index_map | |
| len | the length of the map |
Definition at line 234 of file PatchDataField.cpp.
Here is the call graph for this function:| void PatchDataField< T >::insert | ( | const PatchDataField< T > & | f2 | ) |
Definition at line 229 of file PatchDataField.cpp.
| void PatchDataField< T >::insert_element | ( | T | v | ) |
Definition at line 174 of file PatchDataField.cpp.
|
inline |
Definition at line 169 of file PatchDataField.hpp.
|
inline |
Definition at line 486 of file PatchDataField.hpp.
|
inline |
Definition at line 480 of file PatchDataField.hpp.
|
inline |
Definition at line 171 of file PatchDataField.hpp.
|
static |
Definition at line 383 of file PatchDataField.cpp.
|
static |
Definition at line 372 of file PatchDataField.cpp.
|
inlinenoexcept |
Definition at line 102 of file PatchDataField.hpp.
|
inline |
Definition at line 652 of file PatchDataField.hpp.
|
inline |
Definition at line 646 of file PatchDataField.hpp.
|
inline |
Definition at line 640 of file PatchDataField.hpp.
|
inline |
Definition at line 628 of file PatchDataField.hpp.
|
inline |
Definition at line 634 of file PatchDataField.hpp.
| void PatchDataField< T >::permut_vars | ( | const std::vector< u32 > & | permut | ) |
permut the variables of the field according to the permut
Definition at line 267 of file PatchDataField.cpp.
Here is the call graph for this function:| void PatchDataField< T >::remove_ids | ( | const sham::DeviceBuffer< u32 > & | indexes, |
| u32 | len | ||
| ) |
remove the ids from the field
| indexes | |
| len |
Definition at line 300 of file PatchDataField.cpp.
Here is the call graph for this function:
|
inline |
Definition at line 604 of file PatchDataField.hpp.
|
inline |
Definition at line 599 of file PatchDataField.hpp.
| void PatchDataField< T >::serialize_buf | ( | shamalgs::SerializeHelper & | serializer | ) |
minimal serialization assuming the user know the layout of the field
| serializer |
Definition at line 390 of file PatchDataField.cpp.
| shamalgs::SerializeSize PatchDataField< T >::serialize_buf_byte_size | ( | ) |
record the size usage of the serialization using serialize_buf
Definition at line 418 of file PatchDataField.cpp.
| void PatchDataField< T >::serialize_full | ( | shamalgs::SerializeHelper & | serializer | ) |
serialize everything in the class
| serializer |
Definition at line 425 of file PatchDataField.cpp.
| shamalgs::SerializeSize PatchDataField< T >::serialize_full_byte_size | ( | ) |
|
inline |
Definition at line 616 of file PatchDataField.hpp.
|
inline |
Definition at line 226 of file PatchDataField.hpp.