Skip to content

Peakfinder8

#include <xalgospp/features/peakfinder8.hh>
template<typename MemTag = ncarray::HostTag>
class Peakfinder8

Defined in src/lib/xalgospp/features/peakfinder8.hh:50

Inherits: HostTag >

Name Kind Owner
Peakfinder8 function Declared here
Peakfinder8 function Declared here
configure_impl function Declared here
stage_impl function Declared here
get_staged_data_impl function Declared here
set_staged_data_impl function Declared here
staged_data_size_impl function Declared here
process_impl function Declared here
process_many_impl function Declared here
name_impl function Declared here
params_impl function Declared here
TypeConstraint variable Declared here
Input typedef Declared here
Output typedef Declared here
m_params variable Declared here
m_num_pixels variable Declared here
m_pix_in_peak_map variable Declared here
m_infs variable Declared here
m_inss variable Declared here
m_peak_pixels variable Declared here
m_rstats variable Declared here
m_serialized_data variable Declared here
m_staged_mask variable Declared here
m_staged_r_map variable Declared here
process_cpu function Declared here
Algorithm function Inherited from Algorithm
configure function Inherited from Algorithm
stage function Inherited from Algorithm
get_staged_data function Inherited from Algorithm
set_staged_data function Inherited from Algorithm
staged_data_size function Inherited from Algorithm
process function Inherited from Algorithm
process function Inherited from Algorithm
operator() function Inherited from Algorithm
operator() function Inherited from Algorithm
process_many function Inherited from Algorithm
process_many function Inherited from Algorithm
name function Inherited from Algorithm
print_configuration function Inherited from Algorithm
print_configuration function Inherited from Algorithm
params function Inherited from Algorithm
TypeConstraint variable Inherited from Algorithm
Input typedef Inherited from Algorithm
Output typedef Inherited from Algorithm
Kind Name Description
function Algorithm Defaulted constructor.
function configure inline Perform configuration of the algorithm given an input set of parameters.
function stage inline Optional stage to perform associated actions before processing.
function get_staged_data const inline For Algorithms which provide staging of associated data, retrieve what was staged.
function set_staged_data inline For Algorithms which provide staging of associated data, alternatively set it.
function staged_data_size const inline For Algorithms which provide staging, retrieve the size (in bytes) of the staged data.
function process const inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }())
function process inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }())
function operator() inline
function operator() const inline
function process_many const inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }())
function process_many inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }())
function name const inline
function print_configuration const inline Print the name and current values of the Algorithm’s Parameters.
function print_configuration inline Print the name and current values of the Algorithm’s Parameters.
function params const inline Retrieve the current Parameters for the Algorithm.
variable TypeConstraint static constexpr
typedef Input The list of supported input types.
typedef Output The list of supported output types.
Return Name Description
Peakfinder8 Defaulted constructor.
Peakfinder8 inline
void configure_impl inline
void stage_impl inline For staging, the Peakfinder8Algorithm stages the mask and radius map.
const std::uint8_t * get_staged_data_impl const inline Retrieve a pointer to the serialized mask and radius map.
void set_staged_data_impl inline Provide access from a buffer from elsewhere containing the calibration constants.
std::size_t staged_data_size_impl const inline The total size in bytes of the mask and radius map.
void process_impl const inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)
void process_many_impl inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)
const char * name_impl const inline
const Params & params_impl const inline

Peakfinder8() = default

Defined in src/lib/xalgospp/features/peakfinder8.hh:89

Defaulted constructor.


inline

inline Peakfinder8(const Params & params)

Defined in src/lib/xalgospp/features/peakfinder8.hh:90


inline

inline void configure_impl(const Params & params)

Defined in src/lib/xalgospp/features/peakfinder8.hh:92


inline

inline void stage_impl()

Defined in src/lib/xalgospp/features/peakfinder8.hh:122

For staging, the Peakfinder8Algorithm stages the mask and radius map.

Currently, the staging requires one parallel unit to provide both mask and radius map via the parameters object. In the future, the staging will have the option to also do some calcualtion based on other input types, e.g., a geometry.

Todo: Work on providing alternative staging mechanism than just a full input mask and radius map.

After staging, the data from the contiguous memory allocation is split into two spans which are used everywhere else for the mask and radius map.


const inline

inline const std::uint8_t * get_staged_data_impl() const

Defined in src/lib/xalgospp/features/peakfinder8.hh:171

Retrieve a pointer to the serialized mask and radius map.

The staged data is organized as: | mask | radius_map | in a single contiguous block.

A pointer to the buffer containing mask and radius map.


inline

inline void set_staged_data_impl(std::uint8_t * buf, std::size_t nbytes)

Defined in src/lib/xalgospp/features/peakfinder8.hh:185

Provide access from a buffer from elsewhere containing the calibration constants.

Parameter Type Description
buf std::uint8_t * A buffer containing calibration constants.
nbytes std::size_t The size of the buffer in bytes.

const inline

inline std::size_t staged_data_size_impl() const

Defined in src/lib/xalgospp/features/peakfinder8.hh:212

The total size in bytes of the mask and radius map.

The total size in bytes of the mask and radius map.


const inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)

template<typename InputArg, typename OutputArg> inline void process_impl(const InputArg & input, OutputArg & output) const requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)

Defined in src/lib/xalgospp/features/peakfinder8.hh:216


inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)

template<typename InputArg, typename OutputArg> inline void process_many_impl(std::size_t count, const InputArg & input, OutputArg & output) requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)

Defined in src/lib/xalgospp/features/peakfinder8.hh:230


const inline

inline const char * name_impl() const

Defined in src/lib/xalgospp/features/peakfinder8.hh:236


const inline

inline const Params & params_impl() const

Defined in src/lib/xalgospp/features/peakfinder8.hh:238

Return Name Description
constexpr AlgTypeConstraint TypeConstraint static constexpr

static constexpr

constexpr AlgTypeConstraint TypeConstraint { }

Defined in src/lib/xalgospp/features/peakfinder8.hh:55

Name Description
Input
Output

using Input = type_list< ncarray::NCViewFor< MemTag >, ncarray::SOViewFor< MemTag > >

Defined in src/lib/xalgospp/features/peakfinder8.hh:52


using Output = type_list< ncarray::NCViewFor< MemTag >, ncarray::SOViewFor< MemTag > >

Defined in src/lib/xalgospp/features/peakfinder8.hh:53

Return Name Description
Params m_params
std::size_t m_num_pixels
std::vector< std::uint8_t > m_pix_in_peak_map
std::vector< int > m_infs
std::vector< int > m_inss
std::vector< int > m_peak_pixels
impl::RadialStatistics m_rstats Information for radial background stats.
std::vector< std::uint8_t > m_serialized_data Serialized mask and radius map.
std::span< const bool > m_staged_mask Mask, span over serialized data.
std::span< const float > m_staged_r_map Radius map, span over serialized data.

Params m_params

Defined in src/lib/xalgospp/features/peakfinder8.hh:241


std::size_t m_num_pixels { 0 }

Defined in src/lib/xalgospp/features/peakfinder8.hh:242


std::vector< std::uint8_t > m_pix_in_peak_map

Defined in src/lib/xalgospp/features/peakfinder8.hh:244


std::vector< int > m_infs

Defined in src/lib/xalgospp/features/peakfinder8.hh:245


std::vector< int > m_inss

Defined in src/lib/xalgospp/features/peakfinder8.hh:246


std::vector< int > m_peak_pixels

Defined in src/lib/xalgospp/features/peakfinder8.hh:247


impl::RadialStatistics m_rstats

Defined in src/lib/xalgospp/features/peakfinder8.hh:249

Information for radial background stats.


std::vector< std::uint8_t > m_serialized_data

Defined in src/lib/xalgospp/features/peakfinder8.hh:251

Serialized mask and radius map.


std::span< const bool > m_staged_mask

Defined in src/lib/xalgospp/features/peakfinder8.hh:252

Mask, span over serialized data.


std::span< const float > m_staged_r_map

Defined in src/lib/xalgospp/features/peakfinder8.hh:253

Radius map, span over serialized data.

Return Name Description
void process_cpu const inline

const inline

template<typename InputArg, typename OutputArg> inline void process_cpu(const InputArg & data, OutputArg & peaks_out) const

Defined in src/lib/xalgospp/features/peakfinder8.hh:263