|
10 | 10 |
|
11 | 11 | #pragma once
|
12 | 12 |
|
| 13 | +// The test proxy if solely for the test purposes, so it's off by default, with |
| 14 | +// no any code generated. It is enabled only if the __ESIMD_ENABLE_TEST_PROXY |
| 15 | +// macro is defined. |
| 16 | +// It's expected for the proxy class to be available in device code, so that it |
| 17 | +// could be incorporated into the ESIMD API classes. Though there is no reason |
| 18 | +// to limit it to the __SYCL_DEVICE_ONLY__. |
13 | 19 | #ifndef __ESIMD_ENABLE_TEST_PROXY
|
14 | 20 |
|
15 |
| -// No ABI-breaking changes by default |
| 21 | +// No code generation by default |
16 | 22 | #define __ESIMD_DECLARE_TEST_PROXY
|
17 | 23 | #define __ESIMD_DECLARE_TEST_PROXY_ACCESS
|
18 | 24 | #define __esimd_move_test_proxy(other)
|
@@ -52,26 +58,25 @@ namespace experimental {
|
52 | 58 | namespace esimd {
|
53 | 59 | namespace detail {
|
54 | 60 |
|
55 |
| -/// The test_proxy class. |
56 |
| -/// |
57 |
| -/// This is a helper class for tests to differentiate between the copy |
58 |
| -/// constructor/assignment and the move constructor/assignment calls, |
59 |
| -/// as the copy constructor works as the default fallback for every case with |
60 |
| -/// move constructor disabled or not provided |
61 |
| -/// |
62 |
| -/// The test proxy is enabled only if the __ESIMD_ENABLE_TEST_PROXY macro is |
63 |
| -/// defined. |
64 |
| -/// It is expected for the class with the test proxy (the class under test) to: |
65 |
| -/// - provide the get_test_proxy() method |
66 |
| -/// - properly handle moving the test_proxy member in user-defined move |
67 |
| -/// constructors and user-defined assignment operators |
68 |
| -/// |
69 |
| -/// Therefore the following expression is expected to return `true` only if the |
70 |
| -/// move constructor or move operator was called for the instance of the class |
71 |
| -/// under test: |
72 |
| -/// instance.get_test_proxy().was_moved() |
73 |
| -/// |
74 |
| -/// \ingroup sycl_esimd |
| 61 | +// The test_proxy class. |
| 62 | +// Being intended solely for the test purposes, it is enabled only if the |
| 63 | +// __ESIMD_ENABLE_TEST_PROXY macro is defined, which is off by default. |
| 64 | +// |
| 65 | +// This is a helper class for tests to differentiate between the copy |
| 66 | +// constructor/assignment and the move constructor/assignment calls, |
| 67 | +// as the copy constructor works as the default fallback for every case with |
| 68 | +// move constructor disabled or not provided |
| 69 | +// |
| 70 | +// It is expected for the class with the test proxy (the class under test) to: |
| 71 | +// - provide the get_test_proxy() method |
| 72 | +// - properly handle moving the test_proxy member in user-defined move |
| 73 | +// constructors and user-defined assignment operators |
| 74 | +// |
| 75 | +// Therefore the following expression is expected to return `true` only if the |
| 76 | +// move constructor or move operator was called for the instance of the class |
| 77 | +// under test: |
| 78 | +// instance.get_test_proxy().was_moved() |
| 79 | +// |
75 | 80 | class test_proxy {
|
76 | 81 | // Define the default value to use for every constructor
|
77 | 82 | bool m_moved = false;
|
|
0 commit comments