MCPcopy Create free account
hub / github.com/NVIDIA/DALI / InitTriangleWindow

Function InitTriangleWindow

dali/kernels/imgproc/convolution/baseline_convolution.h:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27template <typename T>
28void InitTriangleWindow(const TensorView<StorageCPU, T, 1> &window) {
29 int radius = window.num_elements() / 2;
30 for (int i = 0; i < radius; i++) {
31 *window(i) = i + 1;
32 *window(window.num_elements() - i - 1) = i + 1;
33 }
34 *window(radius) = radius + 1;
35}
36
37template <typename Out, typename In, typename W>
38void BaselineConvolveAxis(Out *out, const In *in, const W *window, int len, int r, int channel_num,

Callers 1

TESTFunction · 0.85

Calls 2

windowFunction · 0.85
num_elementsMethod · 0.45

Tested by 1

TESTFunction · 0.68