44 template<
class T,
int nChan>
47 float* rowResult = (
float*) alloca(nChan*
sizeof(
float));
48 int rowlen = k.
res.u() * nChan;
49 int datalen = k.
uw * nChan;
50 int rowskip = rowlen - datalen;
52 T* p =
static_cast<T*
>(data) + (k.
v * k.
res.u() + k.
u) * nChan;
53 T* pEnd = p + k.
vw * rowlen;
57 T* pRowEnd = p + datalen;
62 while (p != pRowEnd) {
74 template<
class T,
int nChan>
77 float* rowResult = (
float*) alloca(nChan*
sizeof(
float));
78 int rowlen = k.
res.u() * nTxChan;
79 int datalen = k.
uw * nTxChan;
80 int rowskip = rowlen - datalen;
82 T* p =
static_cast<T*
>(data) + (k.
v * k.
res.u() + k.
u) * nTxChan;
83 T* pEnd = p + k.
vw * rowlen;
87 T* pRowEnd = p + datalen;
92 while (p != pRowEnd) {
107 float* rowResult = (
float*) alloca(nChan*
sizeof(
float));
108 int rowlen = k.
res.u() * nTxChan;
109 int datalen = k.
uw * nTxChan;
110 int rowskip = rowlen - datalen;
112 T* p =
static_cast<T*
>(data) + (k.
v * k.
res.u() + k.
u) * nTxChan;
113 T* pEnd = p + k.
vw * rowlen;
117 T* pRowEnd = p + datalen;
122 while (p != pRowEnd) {
139 ApplyN<uint8_t>, ApplyN<uint16_t>, ApplyN<PtexHalf>, ApplyN<float>,
140 Apply<uint8_t,1>, Apply<uint16_t,1>, Apply<PtexHalf,1>, Apply<float,1>,
141 Apply<uint8_t,2>, Apply<uint16_t,2>, Apply<PtexHalf,2>, Apply<float,2>,
142 Apply<uint8_t,3>, Apply<uint16_t,3>, Apply<PtexHalf,3>, Apply<float,3>,
143 Apply<uint8_t,4>, Apply<uint16_t,4>, Apply<PtexHalf,4>, Apply<float,4>,
146 ApplyN<uint8_t>, ApplyN<uint16_t>, ApplyN<PtexHalf>, ApplyN<float>,
147 ApplyS<uint8_t,1>, ApplyS<uint16_t,1>, ApplyS<PtexHalf,1>, ApplyS<float,1>,
148 ApplyS<uint8_t,2>, ApplyS<uint16_t,2>, ApplyS<PtexHalf,2>, ApplyS<float,2>,
149 ApplyS<uint8_t,3>, ApplyS<uint16_t,3>, ApplyS<PtexHalf,3>, ApplyS<float,3>,
150 ApplyS<uint8_t,4>, ApplyS<uint16_t,4>, ApplyS<PtexHalf,4>, ApplyS<float,4>,
Half-precision floating-point type.
#define PTEX_NAMESPACE_END
void(* ApplyFn)(PtexSeparableKernel &k, float *dst, void *data, int nChan, int nTxChan)
static ApplyFn applyFunctions[40]
void ApplyN(PtexSeparableKernel &k, float *result, void *data, int nChan, int nTxChan)
void ApplyS(PtexSeparableKernel &k, float *result, void *data, int, int nTxChan)
void Apply(PtexSeparableKernel &k, float *result, void *data, int, int)