6#include <thrust/device_vector.h>
8#include <isce3/core/Common.h>
9#include <isce3/core/Kernels.h>
11namespace isce3 {
namespace cuda {
namespace core {
18template<
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; }
70 constexpr T eval(
double t)
const;
118 constexpr double bandwidth() const noexcept {
return _bandwidth; }
122 CUDA_HOSTDEV T eval(
double t)
const;
130class TabulatedKernelView :
public Kernel<T, TabulatedKernelView<T>> {
151 CUDA_DEV T eval(
double t)
const;
179 template<
class OtherKernel>
194 CUDA_DEV T eval(
double t)
const;
197 thrust::device_vector<T> _table;
204class ChebyKernelView :
public Kernel<T, ChebyKernelView<T>> {
225 CUDA_DEV T eval(
double t)
const;
253 template<
class OtherKernel>
258 : Base(other.
width()), _scale(4. / other.
width()),
259 _coeffs(other.coeffs())
271 CUDA_DEV T eval(
double t)
const;
275 thrust::device_vector<T> _coeffs;
280#include "Kernels.icc"
Bartlett kernel (triangle function).
Definition Kernels.h:43
Polynomial Kernel.
Definition Kernels.h:155
Kernel based on the paper by Knab for interpolating band-limited signals.
Definition Kernels.h:65
Linear kernel, which is just a special case of Bartlett.
Definition Kernels.h:53
Tabulated Kernel.
Definition Kernels.h:133
constexpr BartlettKernel(double width)
Construct a new BartlettKernel object.
Definition Kernels.h:61
BartlettKernel(const isce3::core::BartlettKernel< T > &other)
Construct from corresponding host kernel object.
Definition Kernels.h:64
BartlettKernel< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:58
A non-owning reference to a ChebyKernel object.
Definition Kernels.h:204
ChebyKernelView< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:212
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition Kernels.h:221
Chebyshev polynomial kernel.
Definition Kernels.h:235
ChebyKernelView< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:243
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition Kernels.h:267
ChebyKernel(const isce3::core::ChebyKernel< T > &other)
Construct from corresponding host kernel object.
Definition Kernels.h:257
ChebyKernel(const OtherKernel &kernel, int n)
Construct a new ChebyKernel object by computing a fit to another kernel.
Definition Kernels.icc:155
constexpr Kernel(double width) noexcept
Construct a new Kernel object.
Definition Kernels.h:25
CUDA_HOSTDEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition Kernels.icc:22
constexpr double width() const noexcept
Definition Kernels.h:41
T value_type
Kernel coefficients value type.
Definition Kernels.h:22
constexpr double halfwidth() const noexcept
Get the halfwidth of the kernel.
Definition Kernels.h:34
KnabKernel(const isce3::core::KnabKernel< T > &other)
Construct from corresponding host kernel object.
Definition Kernels.h:113
KnabKernel< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:101
constexpr KnabKernel(double width, double bandwidth)
Construct a new KnabKernel object.
Definition Kernels.icc:35
constexpr double bandwidth() const noexcept
Get bandwidth of the kernel.
Definition Kernels.h:118
LinearKernel(const isce3::core::LinearKernel< T > &)
Construct from corresponding host kernel object.
Definition Kernels.h:86
LinearKernel< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:80
constexpr LinearKernel()
Construct a new LinearKernel object.
Definition Kernels.h:83
A non-owning reference to a TabulatedKernel object.
Definition Kernels.h:130
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition Kernels.h:147
TabulatedKernelView< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:138
Tabulated kernel.
Definition Kernels.h:161
TabulatedKernel(const OtherKernel &kernel, int n)
Construct a new TabulatedKernel object.
Definition Kernels.icc:82
CUDA_DEV T operator()(double t) const
Evaluate the kernel at a given location in [-halfwidth, halfwidth].
Definition Kernels.h:190
TabulatedKernelView< T > view_type
A non-owning kernel view type that can be passed to device code.
Definition Kernels.h:169
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5