@@ -39,7 +39,7 @@ template <typename RealType>
39
39
std::int32_t t_test (sycl::queue &q, sycl::buffer<RealType, 1 > &r,
40
40
std::int64_t n, RealType expected_mean) {
41
41
std::int32_t res = -1 ;
42
- RealType sqrt_n_observations = sycl ::sqrt (static_cast <RealType>(n));
42
+ RealType sqrt_n_observations = std ::sqrt (static_cast <RealType>(n));
43
43
44
44
// Create buffers to be passed inside oneMKL stats functions
45
45
sycl::buffer<RealType, 1 > mean_buf (sycl::range{1 });
@@ -55,8 +55,8 @@ std::int32_t t_test(sycl::queue &q, sycl::buffer<RealType, 1> &r,
55
55
// Create Host accessors and check the condition
56
56
sycl::host_accessor mean_acc (mean_buf);
57
57
sycl::host_accessor variance_acc (variance_buf);
58
- if ((sycl ::abs (mean_acc[0 ] - expected_mean) * sqrt_n_observations /
59
- sycl ::sqrt (variance_acc[0 ])) < static_cast <RealType>(threshold)) {
58
+ if ((std ::abs (mean_acc[0 ] - expected_mean) * sqrt_n_observations /
59
+ std ::sqrt (variance_acc[0 ])) < static_cast <RealType>(threshold)) {
60
60
res = 1 ;
61
61
} else {
62
62
res = 0 ;
@@ -100,19 +100,19 @@ std::int32_t t_test(sycl::queue &q, sycl::buffer<RealType, 1> &r1,
100
100
bool almost_equal = (variance1_acc[0 ] < 2 * variance2_acc[0 ]) ||
101
101
(variance2_acc[0 ] < 2 * variance1_acc[0 ]);
102
102
if (almost_equal) {
103
- if ((sycl ::abs (mean1_acc[0 ] - mean2_acc[0 ]) /
104
- sycl ::sqrt ((static_cast <RealType>(1.0 ) / static_cast <RealType>(n1) +
105
- static_cast <RealType>(1.0 ) / static_cast <RealType>(n2)) *
106
- ((n1 - 1 ) * (n1 - 1 ) * variance1_acc[0 ] +
107
- (n2 - 1 ) * (n2 - 1 ) * variance2_acc[0 ]) /
108
- (n1 + n2 - 2 ))) < static_cast <RealType>(threshold)) {
103
+ if ((std ::abs (mean1_acc[0 ] - mean2_acc[0 ]) /
104
+ std ::sqrt ((static_cast <RealType>(1.0 ) / static_cast <RealType>(n1) +
105
+ static_cast <RealType>(1.0 ) / static_cast <RealType>(n2)) *
106
+ ((n1 - 1 ) * (n1 - 1 ) * variance1_acc[0 ] +
107
+ (n2 - 1 ) * (n2 - 1 ) * variance2_acc[0 ]) /
108
+ (n1 + n2 - 2 ))) < static_cast <RealType>(threshold)) {
109
109
res = 1 ;
110
110
} else {
111
111
res = 0 ;
112
112
}
113
113
} else {
114
- if ((sycl ::abs (mean1_acc[0 ] - mean2_acc[0 ]) /
115
- sycl ::sqrt ((variance1_acc[0 ] + variance2_acc[0 ]))) <
114
+ if ((std ::abs (mean1_acc[0 ] - mean2_acc[0 ]) /
115
+ std ::sqrt ((variance1_acc[0 ] + variance2_acc[0 ]))) <
116
116
static_cast <RealType>(threshold)) {
117
117
res = 1 ;
118
118
} else {
0 commit comments