Convolutional Kernels

Provides the kernel classes for the convolution done when computing the weighted density of the points.

Authors

Simone Balducci, Felice Pantaleo, Marco Rovere, Wahid Redjeb, Aurora Perego, Francesco Giacomini

namespace clue
class ExponentialKernel
#include <ConvolutionalKernel.hpp>

The ExponentialKernel class implements an exponential kernel for convolution. It computes the kernel value based on the exponential function, which is defined by its average and amplitude.

Public Functions

ExponentialKernel(float exp_avg, float exp_amplitude)

Construct an ExponentialKernel object.

Parameters:
float exp_avg

The average value for the exponential kernel

float exp_amplitude

The amplitude for the exponential kernel

template<typename TAcc>
ALPAKA_FN_ACC float operator()(const TAcc &acc, float dist_ij, int point_id, int j) const

Computes the kernel value between two points.

Parameters:
const TAcc &acc

The accelerator to use for the computation

float dist_ij

The distance between the two points

int point_id

The index of the first point

int j

The index of the second point

Returns:

The computed kernel value

Private Members

float m_exp_avg
float m_exp_amplitude
class FlatKernel
#include <ConvolutionalKernel.hpp>

The FlatKernel class implements a flat kernel for convolution. It returns a constant value for the kernel, regardless of the distance between points.

Public Functions

FlatKernel(float flat)

Construct a FlatKernel object.

Parameters:
float flat

The flat value for the kernel

template<typename TAcc>
ALPAKA_FN_ACC float operator()(const TAcc &acc, float dist_ij, int point_id, int j) const

Computes the kernel value between two points.

Parameters:
const TAcc &acc

The accelerator to use for the computation

float dist_ij

The distance between the two points

int point_id

The index of the first point

int j

The index of the second point

Returns:

The computed kernel value

Private Members

float m_flat
class GaussianKernel
#include <ConvolutionalKernel.hpp>

The GaussianKernel class implements a Gaussian kernel for convolution. It computes the kernel value based on the Gaussian function, which is defined by its average, standard deviation, and amplitude.

Public Functions

GaussianKernel(float gaus_avg, float gaus_std, float gaus_amplitude)

Construct a GaussianKernel object.

Parameters:
float gaus_avg

The average value for the Gaussian kernel

float gaus_std

The standard deviation for the Gaussian kernel

float gaus_amplitude

The amplitude for the Gaussian kernel

template<typename TAcc>
ALPAKA_FN_ACC float operator()(const TAcc &acc, float dist_ij, int point_id, int j) const

Computes the kernel value between two points.

Parameters:
const TAcc &acc

The accelerator to use for the computation

float dist_ij

The distance between the two points

int point_id

The index of the first point

int j

The index of the second point

Returns:

The computed kernel value

Private Members

float m_gaus_avg
float m_gaus_std
float m_gaus_amplitude