We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c6570d commit 9434ebdCopy full SHA for 9434ebd
dpnp/backend/extensions/window/bartlett.hpp
@@ -45,8 +45,8 @@ class BartlettFunctor
45
{
46
const auto i = id.get(0);
47
48
- data[i] =
49
- T(2) / (N - 1) * ((N - 1) / T(2) - sycl::fabs(i - (N - 1) / T(2)));
+ const T alpha = (N - 1) / T(2);
+ data[i] = T(1) - sycl::fabs(i - alpha) / alpha;
50
}
51
};
52
dpnp/backend/extensions/window/blackman.hpp
@@ -45,8 +45,9 @@ class BlackmanFunctor
- data[i] = T(0.42) - T(0.5) * sycl::cospi(T(2) * i / (N - 1)) +
- T(0.08) * sycl::cospi(T(4) * i / (N - 1));
+ const T alpha = T(2) * i / (N - 1);
+ data[i] = T(0.42) - T(0.5) * sycl::cospi(alpha) +
+ T(0.08) * sycl::cospi(T(2) * alpha);
53
0 commit comments