6 #include <thrust/device_vector.h>
8 #include <isce3/core/Common.h>
9 #include <isce3/core/Kernels.h>
11 namespace isce3 {
namespace cuda {
namespace core {
18 template<
typename T,
class Derived>
26 : _halfwidth(std::abs(
width) / 2.)
34 constexpr
double halfwidth() const noexcept {
return _halfwidth; }
41 constexpr
double width() const noexcept {
return 2. * _halfwidth; }
52 class BartlettKernel :
public Kernel<T, BartlettKernel<T>> {
53 using Base = Kernel<T, BartlettKernel<T>>;
70 constexpr T eval(
double t)
const;
75 class LinearKernel :
public BartlettKernel<T> {
76 using Base = BartlettKernel<T>;
95 class KnabKernel :
public Kernel<T, KnabKernel<T>> {
96 using Base = Kernel<T, KnabKernel<T>>;
118 constexpr
double bandwidth() const noexcept {
return _bandwidth; }
122 CUDA_HOSTDEV T eval(
double t)
const;
151 CUDA_DEV T eval(
double t)
const;
161 class TabulatedKernel :
public Kernel<T, TabulatedKernel<T>> {
162 using Base = Kernel<T, TabulatedKernel<T>>;
165 friend class TabulatedKernelView<T>;
179 template<
class OtherKernel>
194 CUDA_DEV T eval(
double t)
const;
197 thrust::device_vector<T> _table;
225 CUDA_DEV T eval(
double t)
const;
235 class ChebyKernel :
public Kernel<T, ChebyKernel<T>> {
236 using Base = Kernel<T, ChebyKernel<T>>;
239 friend class ChebyKernelView<T>;
253 template<
class OtherKernel>
259 _coeffs(other.coeffs())
271 CUDA_DEV T eval(
double t)
const;
275 thrust::device_vector<T> _coeffs;
280 #include "Kernels.icc"
Kernel based on the paper by Knab for interpolating band-limited signals.
Definition: forward.h:42
Kernel based on the paper by Knab for interpolating band-limited signals .
Definition: forward.h:18
LinearKernel(const isce3::core::LinearKernel< T > &)
Construct from corresponding host kernel object.
Definition: Kernels.h:86
T value_type
Kernel coefficients value type.
Definition: Kernels.h:22
Polynomial Kernel.
Definition: forward.h:46
Linear kernel (special case of Bartlett)
Definition: forward.h:17
CRTP base class for kernels.
Definition: Kernels.h:19
constexpr double halfwidth() const noexcept
Get the halfwidth of the kernel.
Definition: Kernels.h:34
BartlettKernel(const isce3::core::BartlettKernel< T > &other)
Construct from corresponding host kernel object.
Definition: Kernels.h:64
TabulatedKernel(const OtherKernel &kernel, int n)
Construct a new TabulatedKernel object.
Definition: Kernels.icc:82
constexpr double bandwidth() const noexcept
Get bandwidth of the kernel.
Definition: Kernels.h:118
constexpr KnabKernel(double width, double bandwidth)
Construct a new KnabKernel object.
Definition: Kernels.icc:35
KnabKernel(const isce3::core::KnabKernel< T > &other)
Construct from corresponding host kernel object.
Definition: Kernels.h:113
Linear kernel, which is just a special case of Bartlett.
Definition: forward.h:43
ChebyKernel(const OtherKernel &kernel, int n)
Construct a new ChebyKernel object by computing a fit to another kernel.
Definition: Kernels.icc:155
Abstract base class for all kernels.
Definition: forward.h:40
A non-owning reference to a TabulatedKernel object.
Definition: Kernels.h:130
constexpr BartlettKernel(double width)
Construct a new BartlettKernel object.
Definition: Kernels.h:61
constexpr Kernel(double width) noexcept
Construct a new Kernel object.
Definition: Kernels.h:25
Chebyshev polynomial kernel.
Definition: forward.h:20
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition: Kernels.h:190
constexpr double width() const noexcept
Get the width of the kernel.
Definition: Kernels.h:41
constexpr LinearKernel()
Construct a new LinearKernel object.
Definition: Kernels.h:83
Tabulated Kernel.
Definition: forward.h:45
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition: Kernels.h:221
A non-owning reference to a ChebyKernel object.
Definition: Kernels.h:204
CUDA_HOSTDEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition: Kernels.icc:22
Tabulated kernel.
Definition: forward.h:19
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition: Kernels.h:147
ChebyKernel(const isce3::core::ChebyKernel< T > &other)
Construct from corresponding host kernel object.
Definition: Kernels.h:257
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition: Kernels.h:267