Commit 456bbe5 1 parent 3d34efa commit 456bbe5 Copy full SHA for 456bbe5
File tree 13 files changed +39
-0
lines changed
test/xpu_api/utilities/function.objects
13 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelBitAndTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelBitAndTest >([=]() {
35
36
typedef dpl::bit_and<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<int , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (0xEA95 , 0xEA95 ) == 0xEA95 );
41
44
ret_access[0 ] &= (f (0xEA95 , 0x58D3 ) == 0x4891 );
42
45
ret_access[0 ] &= (f (0x58D3 , 0xEA95 ) == 0x4891 );
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelBitNotTest ;
24
25
@@ -34,8 +35,10 @@ kernel_test()
34
35
cgh.single_task <class KernelBitNotTest >([=]() {
35
36
typedef dpl::bit_not<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<F::argument_type, int >::value);
38
40
static_assert (dpl::is_same<F::result_type, int >::value);
41
+ #endif // TEST_STD_VER < 20
39
42
ret_access[0 ] = ((f (0xEA95 ) & 0xFFFF ) == 0x156A );
40
43
ret_access[0 ] &= ((f (0x58D3 ) & 0xFFFF ) == 0xA72C );
41
44
ret_access[0 ] &= ((f (0 ) & 0xFFFF ) == 0xFFFF );
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelBitOrTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelBitOrTest >([=]() {
35
36
typedef dpl::bit_or<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<int , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (0xEA95 , 0xEA95 ) == 0xEA95 );
41
44
ret_access[0 ] &= (f (0xEA95 , 0x58D3 ) == 0xFAD7 );
42
45
ret_access[0 ] &= (f (0x58D3 , 0xEA95 ) == 0xFAD7 );
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelBitXorTest ;
24
25
@@ -35,9 +36,11 @@ kernel_test()
35
36
{
36
37
typedef dpl::bit_xor<int > F;
37
38
const F f = F ();
39
+ #if TEST_STD_VER < 20
38
40
static_assert (dpl::is_same<int , F::first_argument_type>::value);
39
41
static_assert (dpl::is_same<int , F::second_argument_type>::value);
40
42
static_assert (dpl::is_same<int , F::result_type>::value);
43
+ #endif // TEST_STD_VER < 20
41
44
ret_access[0 ] = (f (0xEA95 , 0xEA95 ) == 0 );
42
45
ret_access[0 ] &= (f (0xEA95 , 0x58D3 ) == 0xB246 );
43
46
ret_access[0 ] &= (f (0x58D3 , 0xEA95 ) == 0xB246 );
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelEqualToTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelEqualToTest >([=]() {
35
36
typedef dpl::equal_to<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (36 , 36 ));
41
44
ret_access[0 ] &= (!f (36 , 6 ));
42
45
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelGreaterTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelGreaterTest >([=]() {
35
36
typedef dpl::greater<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (!f (36 , 36 ));
41
44
ret_access[0 ] &= (f (36 , 6 ));
42
45
ret_access[0 ] &= (!f (6 , 36 ));
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelGreaterEqualTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelGreaterEqualTest >([=]() {
35
36
typedef dpl::greater_equal<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (36 , 36 ));
41
44
ret_access[0 ] &= (f (36 , 6 ));
42
45
ret_access[0 ] &= (!f (6 , 36 ));
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelLessTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelLessTest >([=]() {
35
36
typedef dpl::less<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (!f (36 , 36 ));
41
44
ret_access[0 ] &= (!f (36 , 6 ));
42
45
ret_access[0 ] &= (f (6 , 36 ));
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelLessEqualTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelLessEqualTest >([=]() {
35
36
typedef dpl::less_equal<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (36 , 36 ));
41
44
ret_access[0 ] &= (!f (36 , 6 ));
42
45
ret_access[0 ] &= (f (6 , 36 ));
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelNotEqualToTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelNotEqualToTest >([=]() {
35
36
typedef dpl::not_equal_to<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (!f (36 , 36 ));
41
44
ret_access[0 ] &= (f (36 , 6 ));
42
45
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelLogicalAndTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelLogicalAndTest >([=]() {
35
36
typedef dpl::logical_and<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (36 , 36 ));
41
44
ret_access[0 ] &= (!f (36 , 0 ));
42
45
ret_access[0 ] &= (!f (0 , 36 ));
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelLogicalNotTest ;
24
25
@@ -34,8 +35,10 @@ kernel_test()
34
35
cgh.single_task <class KernelLogicalNotTest >([=]() {
35
36
typedef dpl::logical_not<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<F::argument_type, int >::value);
38
40
static_assert (dpl::is_same<F::result_type, bool >::value);
41
+ #endif // TEST_STD_VER < 20
39
42
ret_access[0 ] = (!f (36 ));
40
43
ret_access[0 ] &= (f (0 ));
41
44
Original file line number Diff line number Diff line change 19
19
#include < oneapi/dpl/type_traits>
20
20
21
21
#include " support/utils.h"
22
+ #include " support/test_macros.h"
22
23
23
24
class KernelLogicalOrTest ;
24
25
@@ -34,9 +35,11 @@ kernel_test()
34
35
cgh.single_task <class KernelLogicalOrTest >([=]() {
35
36
typedef dpl::logical_or<int > F;
36
37
const F f = F ();
38
+ #if TEST_STD_VER < 20
37
39
static_assert (dpl::is_same<int , F::first_argument_type>::value);
38
40
static_assert (dpl::is_same<int , F::second_argument_type>::value);
39
41
static_assert (dpl::is_same<bool , F::result_type>::value);
42
+ #endif // TEST_STD_VER < 20
40
43
ret_access[0 ] = (f (36 , 36 ));
41
44
ret_access[0 ] &= (f (36 , 0 ));
42
45
ret_access[0 ] &= (f (0 , 36 ));
You can’t perform that action at this time.
0 commit comments