Skip to content

Commit 57f2b6f

Browse files
vasilytricbb-sycl
authored andcommitted
[SYCL][ESIMD] Replace "dim", "dimensions" with "size", "sizes", etc. (intel#803)
1 parent bc51f78 commit 57f2b6f

22 files changed

+126
-87
lines changed

SYCL/ESIMD/api/functional/ctors/ctor_array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class const_ref {
9191

9292
// The main test routine.
9393
// Using functor class to be able to iterate over the pre-defined data types.
94-
template <typename DataT, typename DimT, typename TestCaseT> class run_test {
95-
static constexpr int NumElems = DimT::value;
94+
template <typename DataT, typename SizeT, typename TestCaseT> class run_test {
95+
static constexpr int NumElems = SizeT::value;
9696

9797
public:
9898
bool operator()(sycl::queue &queue, const std::string &data_type) {

SYCL/ESIMD/api/functional/ctors/ctor_array_core.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd constructor from an array.
18-
// This test uses different data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses different data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test does the following actions:
2121
// - construct fixed-size array that filled with reference values
2222
// - use std::move() to provide it to simd constructor
@@ -200,13 +200,18 @@ int main(int, char **) {
200200
>>>>>>> 6870ea3ee ([SYCL][ESIMD] Provide the for_all_combinations utility (#721))
201201
=======
202202
const auto types = get_tested_types<tested_types::core>();
203-
const auto dims = get_all_dimensions();
203+
const auto sizes = get_all_sizes();
204204
const auto contexts =
205205
unnamed_type_pack<ctors::initializer, ctors::var_decl,
206206
ctors::rval_in_expr, ctors::const_ref>::generate();
207207

208+
<<<<<<< HEAD
208209
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
209210
>>>>>>> c1366f1d7 ([SYCL][ESIMD] Split tests on simd constructors into core and fp_extra (#748))
211+
=======
212+
passed &=
213+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
214+
>>>>>>> e37c07509 ([SYCL][ESIMD] Replace "dim", "dimensions" with "size", "sizes", etc. (#803))
210215

211216
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
212217
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_array_fp_extra.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd constructor from an array.
18-
// This test uses extra fp data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses extra fp data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test does the following actions:
2121
// - construct fixed-size array that filled with reference values
2222
// - use std::move() to provide it to simd constructor
@@ -33,12 +33,13 @@ int main(int, char **) {
3333
bool passed = true;
3434

3535
const auto types = get_tested_types<tested_types::fp_extra>();
36-
const auto dims = get_all_dimensions();
36+
const auto sizes = get_all_sizes();
3737
const auto contexts =
3838
unnamed_type_pack<ctors::initializer, ctors::var_decl,
3939
ctors::rval_in_expr, ctors::const_ref>::generate();
4040

41-
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
41+
passed &=
42+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
4243

4344
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
4445
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_copy.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class const_ref {
107107

108108
// The main test routine.
109109
// Using functor class to be able to iterate over the pre-defined data types.
110-
template <typename DataT, typename DimT, typename TestCaseT> class run_test {
111-
static constexpr int NumElems = DimT::value;
110+
template <typename DataT, typename SizeT, typename TestCaseT> class run_test {
111+
static constexpr int NumElems = SizeT::value;
112112

113113
public:
114114
bool operator()(sycl::queue &queue, const std::string &data_type) {

SYCL/ESIMD/api/functional/ctors/ctor_copy_core.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd copy constructor.
18-
// This test uses different data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses different data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test do the following actions:
2121
// - construct simd object with golden values calls copy constructor from
2222
// constructed simd object
@@ -33,12 +33,13 @@ int main(int, char **) {
3333
bool passed = true;
3434

3535
const auto types = get_tested_types<tested_types::core>();
36-
const auto dims = get_all_dimensions();
36+
const auto sizes = get_all_sizes();
3737
const auto contexts =
3838
unnamed_type_pack<ctors::initializer, ctors::var_decl,
3939
ctors::rval_in_expr, ctors::const_ref>::generate();
4040

41-
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
41+
passed &=
42+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
4243

4344
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
4445
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_copy_fp_extra.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd copy constructor.
18-
// This test uses extra fp data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses different data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test do the following actions:
2121
// - construct simd object with golden values calls copy constructor from
2222
// constructed simd object
@@ -33,12 +33,13 @@ int main(int, char **) {
3333
bool passed = true;
3434

3535
const auto types = get_tested_types<tested_types::fp_extra>();
36-
const auto dims = get_all_dimensions();
36+
const auto sizes = get_all_sizes();
3737
const auto contexts =
3838
unnamed_type_pack<ctors::initializer, ctors::var_decl,
3939
ctors::rval_in_expr, ctors::const_ref>::generate();
4040

41-
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
41+
passed &=
42+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
4243

4344
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
4445
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_default.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ struct const_ref {
7676
};
7777

7878
// Struct that calls simd in provided context and then verifies obtained result.
79-
template <typename DataT, typename DimT, typename TestCaseT> struct run_test {
80-
static constexpr int NumElems = DimT::value;
79+
template <typename DataT, typename SizeT, typename TestCaseT> struct run_test {
80+
static constexpr int NumElems = SizeT::value;
8181

8282
bool operator()(sycl::queue &queue, const std::string &data_type) {
8383
bool passed = true;

SYCL/ESIMD/api/functional/ctors/ctor_default_core.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd default constructor.
18-
// This test uses different data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses different data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test do the following actions:
2121
// - call simd default constructor
2222
// - verify that values from simd is equal to default value of provided
@@ -33,12 +33,13 @@ int main(int, char **) {
3333
bool passed = true;
3434

3535
const auto types = get_tested_types<tested_types::core>();
36-
const auto dims = get_all_dimensions();
36+
const auto sizes = get_all_sizes();
3737
const auto contexts =
3838
unnamed_type_pack<ctors::initializer, ctors::var_decl,
3939
ctors::rval_in_expr, ctors::const_ref>::generate();
4040

41-
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
41+
passed &=
42+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
4243

4344
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
4445
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_default_fp_extra.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
1717
// Test for simd default constructor.
18-
// This test uses extra fp data types, dimensionality and different simd
19-
// constructor invocation contexts.
18+
// This test uses different data types, sizes and different simd constructor
19+
// invocation contexts.
2020
// The test do the following actions:
2121
// - call simd default constructor
2222
// - verify that values from simd is equal to default value of provided
@@ -33,12 +33,13 @@ int main(int, char **) {
3333
bool passed = true;
3434

3535
const auto types = get_tested_types<tested_types::fp_extra>();
36-
const auto dims = get_all_dimensions();
36+
const auto sizes = get_all_sizes();
3737
const auto contexts =
3838
unnamed_type_pack<ctors::initializer, ctors::var_decl,
3939
ctors::rval_in_expr, ctors::const_ref>::generate();
4040

41-
passed &= for_all_combinations<ctors::run_test>(types, dims, contexts, queue);
41+
passed &=
42+
for_all_combinations<ctors::run_test>(types, sizes, contexts, queue);
4243

4344
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
4445
return passed ? 0 : 1;

SYCL/ESIMD/api/functional/ctors/ctor_fill.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ template <init_val... Values> auto get_init_values_pack() {
195195
return value_pack<init_val, Values...>::generate_unnamed();
196196
}
197197

198-
template <typename DataT, typename DimT, typename TestCaseT, typename BaseValT,
198+
template <typename DataT, typename SizeT, typename TestCaseT, typename BaseValT,
199199
typename StepT>
200200
class run_test {
201-
static constexpr int NumElems = DimT::value;
201+
static constexpr int NumElems = SizeT::value;
202202
static constexpr init_val BaseVal = BaseValT::value;
203203
static constexpr init_val Step = StepT::value;
204204
using KernelT = kernel_for_fill<DataT, NumElems, TestCaseT, BaseVal, Step>;

SYCL/ESIMD/api/functional/ctors/ctor_fill_accuracy_fp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ int main(int, char **) {
3535

3636
bool passed = true;
3737

38-
// Using single dimension and context to verify the accuracy of operations
38+
// Using single size and context to verify the accuracy of operations
3939
// with floating point data types
4040
const auto types = get_tested_types<tested_types::fp>();
41-
const auto single_dim = get_dimensions<8>();
41+
const auto single_size = get_sizes<8>();
4242
const auto context = unnamed_type_pack<ctors::var_decl>::generate();
4343

4444
// Run for specific combinations of types, base and step values and vector
@@ -48,7 +48,7 @@ int main(int, char **) {
4848
const auto base_values = ctors::get_init_values_pack<init_val::denorm>();
4949
const auto step_values = ctors::get_init_values_pack<init_val::ulp>();
5050
passed &= for_all_combinations<ctors::run_test>(
51-
types, single_dim, context, base_values, step_values, queue);
51+
types, single_size, context, base_values, step_values, queue);
5252
}
5353
#endif
5454
{
@@ -57,7 +57,7 @@ int main(int, char **) {
5757
const auto step_values =
5858
ctors::get_init_values_pack<init_val::ulp, init_val::ulp_half>();
5959
passed &= for_all_combinations<ctors::run_test>(
60-
types, single_dim, context, base_values, step_values, queue);
60+
types, single_size, context, base_values, step_values, queue);
6161
}
6262

6363
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");

SYCL/ESIMD/api/functional/ctors/ctor_fill_accuracy_fp_extra.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main(int, char **) {
5858
<<<<<<< HEAD:SYCL/ESIMD/api/functional/ctors/ctor_fill_accuracy_fp_extra.cpp
5959
=======
6060
const auto types = get_tested_types<tested_types::fp_extra>();
61-
const auto single_dim = get_dimensions<8>();
61+
const auto single_size = get_sizes<8>();
6262
const auto context = unnamed_type_pack<ctors::var_decl>::generate();
6363
// Run for specific combinations of types, base and step values and vector
6464
// length.
@@ -72,6 +72,7 @@ int main(int, char **) {
7272
const auto step_values =
7373
ctors::get_init_values_pack<ctors::init_val::ulp>();
7474
passed &= for_all_combinations<ctors::run_test>(
75+
<<<<<<< HEAD
7576
types, single_dim, context, base_values, step_values, queue);
7677
<<<<<<< HEAD
7778
=======
@@ -82,6 +83,9 @@ int main(int, char **) {
8283
>>>>>>> 6870ea3ee ([SYCL][ESIMD] Provide the for_all_combinations utility (#721)):SYCL/ESIMD/api/functional/ctors/ctor_fill_accuracy_core.cpp
8384
=======
8485
>>>>>>> c1366f1d7 ([SYCL][ESIMD] Split tests on simd constructors into core and fp_extra (#748))
86+
=======
87+
types, single_size, context, base_values, step_values, queue);
88+
>>>>>>> e37c07509 ([SYCL][ESIMD] Replace "dim", "dimensions" with "size", "sizes", etc. (#803))
8589
}
8690
#endif
8791
{
@@ -96,6 +100,7 @@ int main(int, char **) {
96100
ctors::get_init_values_pack<ctors::init_val::ulp,
97101
ctors::init_val::ulp_half>();
98102
passed &= for_all_combinations<ctors::run_test>(
103+
<<<<<<< HEAD
99104
types, single_dim, context, base_values, step_values, queue);
100105
<<<<<<< HEAD
101106
=======
@@ -107,6 +112,9 @@ int main(int, char **) {
107112
>>>>>>> 6870ea3ee ([SYCL][ESIMD] Provide the for_all_combinations utility (#721)):SYCL/ESIMD/api/functional/ctors/ctor_fill_accuracy_core.cpp
108113
=======
109114
>>>>>>> c1366f1d7 ([SYCL][ESIMD] Split tests on simd constructors into core and fp_extra (#748))
115+
=======
116+
types, single_size, context, base_values, step_values, queue);
117+
>>>>>>> e37c07509 ([SYCL][ESIMD] Replace "dim", "dimensions" with "size", "sizes", etc. (#803))
110118
}
111119

112120
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");

0 commit comments

Comments
 (0)