Skip to content

Commit 7802416

Browse files
committed
[SYCL][ESIMD] Clarify comments for the test_proxy
Signed-off-by: Kochetkov, Yuriy <[email protected]>
1 parent 66c57e2 commit 7802416

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/detail/test_proxy.hpp

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010

1111
#pragma once
1212

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__.
1319
#ifndef __ESIMD_ENABLE_TEST_PROXY
1420

15-
// No ABI-breaking changes by default
21+
// No code generation by default
1622
#define __ESIMD_DECLARE_TEST_PROXY
1723
#define __ESIMD_DECLARE_TEST_PROXY_ACCESS
1824
#define __esimd_move_test_proxy(other)
@@ -52,26 +58,25 @@ namespace experimental {
5258
namespace esimd {
5359
namespace detail {
5460

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+
//
7580
class test_proxy {
7681
// Define the default value to use for every constructor
7782
bool m_moved = false;

0 commit comments

Comments
 (0)