Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
algorithm.hpp File Reference

main include file for the shamalgs algorithms More...

#include "shamalgs/primitives/sort_by_keys.hpp"
#include "shambackends/DeviceBuffer.hpp"
#include "shambackends/DeviceQueue.hpp"
#include "shambackends/sycl.hpp"
#include "shambackends/typeAliasVec.hpp"
+ Include dependency graph for algorithm.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shamalgs
 namespace to contain everything implemented by shamalgs
 
namespace  shamalgs::algorithm
 namespace to store algorithms implemented by shamalgs
 

Functions

template<class Tkey , class Tval >
void shamalgs::algorithm::sort_by_key (sycl::queue &q, sycl::buffer< Tkey > &buf_key, sycl::buffer< Tval > &buf_values, u32 len)
 Sort the buffer according to the key order.
 
template<class Tkey , class Tval >
void shamalgs::algorithm::sort_by_key (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< Tkey > &buf_key, sham::DeviceBuffer< Tval > &buf_values, u32 len)
 
template<class Fct >
sycl::buffer< typename std::invoke_result_t< Fct, u32 > > shamalgs::algorithm::gen_buffer_device (sycl::queue &q, u32 len, Fct &&func)
 generate a buffer from a lambda expression based on the indexes
 
template<class T >
sycl::buffer< T > shamalgs::algorithm::index_remap (sycl::queue &q, sycl::buffer< T > &source_buf, sycl::buffer< u32 > &index_map, u32 len)
 remap a buffer according to a given index map result[i] = result[index_map[i]]
 
template<class T >
sycl::buffer< T > shamalgs::algorithm::index_remap_nvar (sycl::queue &q, sycl::buffer< T > &source_buf, sycl::buffer< u32 > &index_map, u32 len, u32 nvar)
 remap a buffer (with multiple variable per index) according to a given index map result[i] = result[index_map[i]]
 
template<class T >
void shamalgs::algorithm::index_remap (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< T > &source, sham::DeviceBuffer< T > &dest, sham::DeviceBuffer< u32 > &index_map, u32 len)
 
template<class T >
void shamalgs::algorithm::index_remap_nvar (const sham::DeviceScheduler_ptr &sched, sham::DeviceBuffer< T > &source, sham::DeviceBuffer< T > &dest, sham::DeviceBuffer< u32 > &index_map, u32 len, u32 nvar)
 
template<class T >
sham::DeviceBuffer< T > shamalgs::algorithm::index_remap (const sham::DeviceScheduler_ptr &sched_ptr, sham::DeviceBuffer< T > &source, sham::DeviceBuffer< u32 > &index_map, u32 len)
 
template<class T >
sham::DeviceBuffer< T > shamalgs::algorithm::index_remap_nvar (const sham::DeviceScheduler_ptr &sched_ptr, sham::DeviceBuffer< T > &source, sham::DeviceBuffer< u32 > &index_map, u32 len, u32 nvar)
 
sycl::buffer< u32shamalgs::algorithm::gen_buffer_index (sycl::queue &q, u32 len)
 generate a buffer such that for i in [0,len[, buf[i] = i
 

Detailed Description

main include file for the shamalgs algorithms

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file algorithm.hpp.