24 static_assert(Base::DIMENSIONALITY == 3,
"The texture type of a `SinogramHEALPix` must have dimensionality 3.");
142 FloatType b =
a -
e * (std::abs(
f) - 1.0) * (std::fmod(
a, 0.5) - 0.25);
143 a = (1.0 -
e) * (3.0 *
c / 8.0) +
e * (
f / 4.0);
General tools and structs.
#define __host__
Definition Global.h:17
#define __device__
Definition Global.h:22
A 3D texture stored for access by the CPU, structured for storing an even distribution of values over...
Definition SinogramHEALPix.h:21
typename Base::SizeType SizeType
Definition SinogramHEALPix.h:27
typename Base::VectorType VectorType
Definition SinogramHEALPix.h:28
static SinogramHEALPix FromTensor(const at::Tensor &tensor, FloatType rSpacing)
Definition SinogramHEALPix.h:55
texture_t Base
Definition SinogramHEALPix.h:23
static SinogramHEALPix FromCUDAHandle(int64_t textureHandle, const Vec< int64_t, 3 > &sizeUVR, FloatType rSpacing)
Definition SinogramHEALPix.h:72
typename Base::AddressModeType AddressModeType
Definition SinogramHEALPix.h:29
SinogramHEALPix(const SinogramHEALPix &)=default
SinogramHEALPix()=default
typename Base::IntType IntType
Definition SinogramHEALPix.h:25
typename Base::FloatType FloatType
Definition SinogramHEALPix.h:26
SinogramHEALPix & operator=(SinogramHEALPix &&)=default
SinogramHEALPix(SinogramHEALPix &&)=default
SinogramHEALPix & operator=(const SinogramHEALPix &)=default
SinogramHEALPix(Base texture)
Construct the texture with data.
Definition SinogramHEALPix.h:37
__host__ __device__ float Sample(const VectorType &rThetaPhi) const
Definition SinogramHEALPix.h:83
A simple vector class derived from std::array<T, N>, providing overrides for all useful operators.
Definition Vec.h:21
__host__ __device__ constexpr Vec< T, 2 > XY() const
Construct a Vec from the first two elements.
Definition Vec.h:475
__host__ __device__ constexpr Vec< T,(Ns+...)> VecCat(const Vec< T, Ns > &... vecs)
reg23::Vec concatenation of any number of vectors
Definition Vec.h:841
Vec< TextureAddressMode, DIMENSIONALITY > StringsToAddressModes(const std::array< std::string_view, DIMENSIONALITY > &strings)
Definition Texture.h:44
Definition GridSample3DCPU.cpp:6