Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
compute_histogram.hpp File Reference
#include "shambase/exception.hpp"
#include "shambase/overloaded.hpp"
#include "shambase/string.hpp"
#include "shamalgs/ImplVariant.hpp"
#include "shambackends/Device.hpp"
#include "shambackends/DeviceBuffer.hpp"
#include "shambackends/DeviceScheduler.hpp"
#include "shambackends/kernel_call.hpp"
#include "shamcomm/logs.hpp"
#include <shambackends/sycl.hpp>
#include <optional>
#include <stdexcept>
#include <tuple>
#include <utility>
#include <vector>
Include dependency graph for compute_histogram.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shamalgs::primitives::impl::Reference
 CPU reference implementation, computed on a host copy of the buffers. More...
struct  shamalgs::primitives::impl::NaiveGpu
 Portable GPU kernel, one work-item per bin. More...
struct  shamalgs::primitives::impl::GpuTeamFetching
 GPU kernel using a team-local cache to coalesce input reads. More...
struct  shamalgs::primitives::impl::GpuOversubscribe
 GPU kernel oversubscribing a work-group per bin, reducing locally. More...

Namespaces

namespace  shamalgs
 namespace to contain everything implemented by shamalgs
namespace  shamalgs::primitives
 namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
namespace  shamalgs::primitives::impl
 namespace to control implementation behavior

Functions

std::vector< std::string > shamalgs::primitives::impl::get_default_impl_list_compute_histogram ()
 Get list of available compute_histogram implementations.
std::string shamalgs::primitives::impl::get_current_impl_compute_histogram ()
 Get the current implementation for compute_histogram.
bool shamalgs::primitives::impl::is_impl_set_compute_histogram ()
 Check if an implementation has been selected for compute_histogram.
void shamalgs::primitives::impl::set_impl_compute_histogram (const std::string &impl)
 Set the implementation for compute_histogram.
void shamalgs::primitives::impl::autoselect_impl_compute_histogram (const sham::DeviceScheduler_ptr &dev_sched)
 Select the default implementation for compute_histogram.
template<class T, class Tbins, class... Targs, class Tfunctor>
void shamalgs::primitives::impl::compute_histogram_reference (const sham::DeviceBuffer< Tbins > &bin_edge_inf, const sham::DeviceBuffer< Tbins > &bin_edge_sup, size_t nbins, size_t element_count, Tfunctor &&functor, sham::DeviceBuffer< T > &result, const sham::DeviceBuffer< Targs > &...input_data)
template<class T, class Tbins, class... Targs, class Tfunctor>
void shamalgs::primitives::impl::compute_histogram_naive_gpu (const sham::DeviceScheduler_ptr &dev_sched, const sham::DeviceBuffer< Tbins > &bin_edge_inf, const sham::DeviceBuffer< Tbins > &bin_edge_sup, size_t nbins, size_t element_count, Tfunctor &&functor, sham::DeviceBuffer< T > &result, const sham::DeviceBuffer< Targs > &...input_data)
template<class T, class Tbins, class... Targs, class Tfunctor>
void shamalgs::primitives::impl::compute_histogram_gpu_team_fetching (const sham::DeviceScheduler_ptr &dev_sched, const sham::DeviceBuffer< Tbins > &bin_edge_inf, const sham::DeviceBuffer< Tbins > &bin_edge_sup, size_t nbins, size_t element_count, Tfunctor &&functor, sham::DeviceBuffer< T > &result, const sham::DeviceBuffer< Targs > &...input_data)
template<class T, class Tbins, class... Targs, class Tfunctor>
void shamalgs::primitives::impl::compute_histogram_gpu_oversubscribe (const sham::DeviceScheduler_ptr &dev_sched, u32 group_size, const sham::DeviceBuffer< Tbins > &bin_edge_inf, const sham::DeviceBuffer< Tbins > &bin_edge_sup, size_t nbins, size_t element_count, Tfunctor &&functor, sham::DeviceBuffer< T > &result, const sham::DeviceBuffer< Targs > &...input_data)
template<class T, class Tbins, class... Targs, class Tfunctor>
sham::DeviceBuffer< T > shamalgs::primitives::compute_histogram (const sham::DeviceScheduler_ptr &dev_sched, const sham::DeviceBuffer< Tbins > &bin_edge_inf, const sham::DeviceBuffer< Tbins > &bin_edge_sup, size_t element_count, Tfunctor &&functor, const sham::DeviceBuffer< Targs > &...input_data)
template<class T>
sham::DeviceBuffer< T > shamalgs::primitives::compute_histogram_basic (const sham::DeviceScheduler_ptr &dev_sched, const sham::DeviceBuffer< T > &bin_edge_inf, const sham::DeviceBuffer< T > &bin_edge_sup, const sham::DeviceBuffer< T > &positions)

Variables

shamalgs::ImplVariantGlobal< Reference, NaiveGpu, GpuTeamFetching, GpuOversubscribe > shamalgs::primitives::impl::compute_histogram_impl

Detailed Description

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 compute_histogram.hpp.