FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
ginterp_kernels.h
Go to the documentation of this file.
1#pragma once
2
13#include "backend/types.h"
14#include <cstddef>
15#include <cstdint>
16
17// Forward-declared; full definition lives in `cusz_type_subset.h` (included
18// only by ginterp_kernels.cu and ginterp_stage.cu, the two consumers).
20
21namespace fz {
22enum class GInterp2DGeometry : uint8_t;
23namespace ginterp {
24
27constexpr int kGInterpProfilingErrCount = 36;
28
34dim3 ginterpAnchorLen3(size_t nx, size_t ny, size_t nz);
35
42dim3 ginterpAnchorLen2(size_t nx, size_t ny);
43
63template <typename TInput, typename TCode>
65 const TInput* d_data, dim3 data_len3,
66 TCode* d_ectrl,
67 TInput* d_anchor, dim3 anchor_len3,
68 TInput* d_outlier_vals, uint32_t* d_outlier_idxs,
69 uint32_t* d_outlier_count_scratch,
70 uint32_t d_outlier_capacity,
71 double eb_r, double ebx2, int radius,
72 const INTERPOLATION_PARAMS& intp_param,
73 fz::stream_t stream);
74
85template <typename TInput, typename TCode>
87 const TCode* d_ectrl, dim3 data_len3,
88 const TInput* d_anchor, dim3 anchor_len3,
89 TInput* d_outlier_tmp,
90 TInput* d_out,
91 double eb_r, double ebx2, int radius,
92 const INTERPOLATION_PARAMS& intp_param,
93 fz::stream_t stream);
94
106template <typename TInput, typename TCode>
108 const TInput* d_data, dim3 data_len3,
109 TCode* d_ectrl,
110 TInput* d_anchor, dim3 anchor_len3,
111 TInput* d_outlier_vals, uint32_t* d_outlier_idxs,
112 uint32_t* d_outlier_count_scratch,
113 uint32_t d_outlier_capacity,
114 double eb_r, double ebx2, int radius,
115 const INTERPOLATION_PARAMS& intp_param,
116 GInterp2DGeometry geometry,
117 fz::stream_t stream);
118
124template <typename TInput, typename TCode>
126 const TCode* d_ectrl, dim3 data_len3,
127 const TInput* d_anchor, dim3 anchor_len3,
128 TInput* d_outlier_tmp,
129 TInput* d_out,
130 double eb_r, double ebx2, int radius,
131 const INTERPOLATION_PARAMS& intp_param,
132 GInterp2DGeometry geometry,
133 fz::stream_t stream);
134
139void launchGInterpResetErrors(float* d_errors, fz::stream_t stream);
140
149template <typename TInput>
151 const TInput* d_data, dim3 data_len3,
152 float* d_errors,
153 fz::stream_t stream);
154
165template <typename TInput>
167 const TInput* d_data, dim3 data_len3,
168 int dim,
169 float* d_errors,
170 fz::stream_t stream);
171
209template <typename TInput>
211 const TInput* d_data, dim3 data_len3,
212 int dim,
213 dim3 sample_starts, dim3 sample_block_grid_sizes, dim3 sample_strides,
214 float eb_r, float ebx2,
215 const INTERPOLATION_PARAMS& intp_param,
216 float* d_errors,
217 float* d_block_errors,
218 size_t block_capacity,
219 bool workflow,
220 GInterp2DGeometry geometry,
221 fz::stream_t stream);
222
232template <typename TInput>
234 const TInput* d_outlier_vals,
235 const uint32_t* d_outlier_idxs,
236 uint32_t n,
237 TInput* d_outlier_tmp,
238 fz::stream_t stream);
239
240} // namespace ginterp
241} // namespace fz
void launchGInterpProfileMode3(const TInput *d_data, dim3 data_len3, int dim, dim3 sample_starts, dim3 sample_block_grid_sizes, dim3 sample_strides, float eb_r, float ebx2, const INTERPOLATION_PARAMS &intp_param, float *d_errors, float *d_block_errors, size_t block_capacity, bool workflow, GInterp2DGeometry geometry, fz::stream_t stream)
void launchGInterpProfileMode1(const TInput *d_data, dim3 data_len3, float *d_errors, fz::stream_t stream)
dim3 ginterpAnchorLen2(size_t nx, size_t ny)
void launchGInterpProfileMode2(const TInput *d_data, dim3 data_len3, int dim, float *d_errors, fz::stream_t stream)
void launchScatterOutliers(const TInput *d_outlier_vals, const uint32_t *d_outlier_idxs, uint32_t n, TInput *d_outlier_tmp, fz::stream_t stream)
void launchGInterpForward3D(const TInput *d_data, dim3 data_len3, TCode *d_ectrl, TInput *d_anchor, dim3 anchor_len3, TInput *d_outlier_vals, uint32_t *d_outlier_idxs, uint32_t *d_outlier_count_scratch, uint32_t d_outlier_capacity, double eb_r, double ebx2, int radius, const INTERPOLATION_PARAMS &intp_param, fz::stream_t stream)
void launchGInterpInverse3D(const TCode *d_ectrl, dim3 data_len3, const TInput *d_anchor, dim3 anchor_len3, TInput *d_outlier_tmp, TInput *d_out, double eb_r, double ebx2, int radius, const INTERPOLATION_PARAMS &intp_param, fz::stream_t stream)
dim3 ginterpAnchorLen3(size_t nx, size_t ny, size_t nz)
constexpr int kGInterpProfilingErrCount
Definition ginterp_kernels.h:27
void launchGInterpResetErrors(float *d_errors, fz::stream_t stream)
void launchGInterpForward2D(const TInput *d_data, dim3 data_len3, TCode *d_ectrl, TInput *d_anchor, dim3 anchor_len3, TInput *d_outlier_vals, uint32_t *d_outlier_idxs, uint32_t *d_outlier_count_scratch, uint32_t d_outlier_capacity, double eb_r, double ebx2, int radius, const INTERPOLATION_PARAMS &intp_param, GInterp2DGeometry geometry, fz::stream_t stream)
void launchGInterpInverse2D(const TCode *d_ectrl, dim3 data_len3, const TInput *d_anchor, dim3 anchor_len3, TInput *d_outlier_tmp, TInput *d_out, double eb_r, double ebx2, int radius, const INTERPOLATION_PARAMS &intp_param, GInterp2DGeometry geometry, fz::stream_t stream)
Definition dag.h:24
GInterp2DGeometry
Selects the two supported 2-D spline geometries. 3-D always uses 16^3.
Definition ginterp_stage.h:35
Definition cusz_type_subset.h:32
Backend-neutral GPU type aliases.