Skip to content

Commit dfea516

Browse files
[ESIMD] Doxygen update part I - fix structure, filter non-public APIs. (#5383)
Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com> Co-authored-by: Alexander Batashev <alexbatashev@outlook.com>
1 parent 844d7b6 commit dfea516

25 files changed

+494
-198
lines changed

sycl/doc/doxygen.cfg.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ COLS_IN_ALPHA_INDEX = 4
11181118
# while generating the index headers.
11191119
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
11201120

1121-
IGNORE_PREFIX = cl::sycl::
1121+
IGNORE_PREFIX = cl::sycl:: cl::sycl::ext::intel::experimental::esimd
11221122

11231123
#---------------------------------------------------------------------------
11241124
# Configuration options related to the HTML output
@@ -2115,7 +2115,10 @@ PREDEFINED = "__SYCL_INLINE_NAMESPACE(X)=namespace X" \
21152115
# definition found in the source code.
21162116
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
21172117

2118-
EXPAND_AS_DEFINED =
2118+
EXPAND_AS_DEFINED = \
2119+
__ESIMD_DEF_SIMD_OBJ_IMPL_BIN_OP __ESIMD_BITWISE_OP_FILTER \
2120+
__ESIMD_SHIFT_OP_FILTER __ESIMD_UNARY_INTRINSIC_DEF __ESIMD_EMATH_COND \
2121+
__ESIMD_BINARY_INTRINSIC_DEF __ESIMD_INTRINSIC_DEF
21192122

21202123
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
21212124
# remove all references to function-like macros that are alone on a line, have

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,43 @@
1010

1111
#pragma once
1212

13-
/// \defgroup sycl_esimd DPC++ Explicit SIMD API
13+
/// @defgroup sycl_esimd DPC++ Explicit SIMD API
14+
/// This is a low-level API providing direct access to Intel GPU hardware
15+
/// features. ESIMD overview can be found
16+
/// [here](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/ExplicitSIMD/dpcpp-explicit-simd.md).
17+
18+
///@{
19+
/// @ingroup sycl_esimd
20+
21+
/// @defgroup sycl_esimd_core ESIMD core.
22+
/// Core APIs defining main vector data types and their interfaces.
23+
24+
/// @defgroup sycl_esimd_memory Memory access API.
25+
/// ESIMD APIs to access memory via accessors, USM pointers, perform per-element
26+
/// atomic operations.
27+
28+
/// @defgroup sycl_esimd_math ESIMD math operations.
29+
/// Defines math operations on ESIMD vector data types.
30+
31+
/// @defgroup sycl_esimd_bitmanip Bit and mask manipulation APIs.
32+
33+
/// @defgroup sycl_esimd_conv Explicit conversions.
34+
/// @ingroup sycl_esimd
35+
/// Defines explicit conversions (with and without saturation), truncation etc.
36+
/// between ESIMD vector types.
37+
38+
/// @defgroup sycl_esimd_misc Miscellaneous ESIMD convenience functions.
39+
40+
/// The main components of the API are:
41+
/// - @ref sycl_esimd_core - core API defining main vector data types and
42+
/// their
43+
/// interfaces.
44+
/// - @ref sycl_esimd_memory
45+
/// - @ref sycl_esimd_math
46+
/// - @ref sycl_esimd_bitmanip
47+
/// - @ref sycl_esimd_conv
48+
/// - @ref sycl_esimd_misc
49+
///@}
1450

1551
#include <sycl/ext/intel/experimental/esimd/alt_ui.hpp>
1652
#include <sycl/ext/intel/experimental/esimd/common.hpp>

sycl/include/sycl/ext/intel/experimental/esimd/alt_ui.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ namespace intel {
1818
namespace experimental {
1919
namespace esimd {
2020

21+
/// @{
22+
/// @ingroup sycl_esimd_misc
23+
2124
/// "Merges" elements of the input vectors according to the merge mask.
2225
/// @param a the first vector
2326
/// @param b the second vector
2427
/// @param m the merge mask
2528
/// @return a vector, where each element equals to corresponding element from
2629
/// \c a (if corresponding mask element is zero) or \c b (otherwise)
27-
/// \ingroup sycl_esimd
2830
template <class T, int N>
2931
__ESIMD_API simd<T, N> merge(simd<T, N> a, simd<T, N> b, simd_mask<N> m) {
3032
a.merge(b, m);
@@ -53,6 +55,8 @@ __ESIMD_API auto merge(simd_view<BaseT1, RegionT1> v1,
5355
return merge(v1.read(), v2.read(), m);
5456
}
5557

58+
/// @} sycl_esimd_misc
59+
5660
} // namespace esimd
5761
} // namespace experimental
5862
} // namespace intel

sycl/include/sycl/ext/intel/experimental/esimd/common.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ namespace intel {
7474
namespace experimental {
7575
namespace esimd {
7676

77+
/// @{
78+
/// @ingroup sycl_esimd_core
79+
7780
using uchar = unsigned char;
7881
using ushort = unsigned short;
7982
using uint = unsigned int;
@@ -255,6 +258,8 @@ using EsimdSbarrierType = split_barrier_action;
255258
/// identified by its "binding table index" - surface index.
256259
using SurfaceIndex = unsigned int;
257260

261+
/// @} sycl_esimd_core
262+
258263
} // namespace esimd
259264
} // namespace experimental
260265
} // namespace intel

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//===----------------------------------------------------------------------===//
88
#pragma once
99

10+
/// @cond ESIMD_DETAIL
11+
1012
#include <CL/sycl/exception.hpp>
1113

1214
// This function implements atomic update of pre-existing variable in the
@@ -19,3 +21,5 @@ template <typename Ty> Ty atomic_add_fetch(Ty *ptr, Ty val) {
1921
return __atomic_add_fetch(ptr, val, __ATOMIC_RELAXED);
2022
#endif
2123
}
24+
25+
/// @endcond ESIMD_DETAIL

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585

8686
#include <CL/sycl/half_type.hpp>
8787

88+
/// @cond ESIMD_DETAIL
89+
8890
__SYCL_INLINE_NAMESPACE(cl) {
8991
namespace __SEIEED {
9092

@@ -580,7 +582,6 @@ template <typename T>
580582
static inline constexpr bool is_generic_floating_point_v =
581583
element_type_traits<T>::is_floating_point;
582584

583-
// @{
584585
// Get computation type of a binary operator given its operand types:
585586
// - if both types are arithmetic - return CPP's "common real type" of the
586587
// computation (matches C++)
@@ -653,8 +654,6 @@ template <class T1, class T2 = T1>
653654
using computation_type_t =
654655
typename computation_type<remove_cvref_t<T1>, remove_cvref_t<T2>>::type;
655656

656-
// @}
657-
658657
////////////////////////////////////////////////////////////////////////////////
659658
// sycl::half traits
660659
////////////////////////////////////////////////////////////////////////////////
@@ -723,3 +722,5 @@ inline std::istream &operator>>(std::istream &I, sycl::half &rhs) {
723722

724723
} // namespace __SEIEED
725724
} // __SYCL_INLINE_NAMESPACE(cl)
725+
726+
/// @endcond ESIMD_DETAIL

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#pragma once
1212

13+
/// @cond ESIMD_DETAIL
14+
1315
#ifndef __SYCL_DEVICE_ONLY__
1416

1517
#include <assert.h>
@@ -458,3 +460,5 @@ template <> struct dwordtype<unsigned int> { static const bool value = true; };
458460
} // __SYCL_INLINE_NAMESPACE(cl)
459461

460462
#endif // #ifndef __SYCL_DEVICE_ONLY__
463+
464+
/// @endcond ESIMD_DETAIL

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#pragma once
1313

14+
/// @cond ESIMD_DETAIL
15+
1416
#include <sycl/ext/intel/experimental/esimd/common.hpp>
1517
#include <sycl/ext/intel/experimental/esimd/detail/types.hpp>
1618
#include <sycl/ext/intel/experimental/esimd/detail/util.hpp>
@@ -343,3 +345,5 @@ __esimd_wrindirect(__SEIEED::vector_type_t<T, N> OldVal,
343345
}
344346

345347
#endif // __SYCL_DEVICE_ONLY__
348+
349+
/// @endcond ESIMD_DETAIL

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#pragma once
1313

14+
/// @cond ESIMD_DETAIL
15+
1416
#include <CL/sycl/builtins.hpp>
1517
#include <sycl/ext/intel/experimental/esimd/common.hpp>
1618
#include <sycl/ext/intel/experimental/esimd/detail/elem_type_traits.hpp>
@@ -1199,3 +1201,5 @@ __ESIMD_INTRIN __ESIMD_raw_vec_t(T, N)
11991201
#endif // #ifdef __SYCL_DEVICE_ONLY__
12001202

12011203
#undef __ESIMD_raw_vec_t
1204+
1205+
/// @endcond ESIMD_DETAIL

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// the SIMD classes objects.
1010
//===----------------------------------------------------------------------===//
1111

12+
/// @cond ESIMD_DETAIL
13+
1214
#pragma once
1315

1416
#include <CL/sycl/detail/accessor_impl.hpp>
@@ -924,3 +926,5 @@ __ESIMD_INTRIN void __esimd_raw_send2_noresult(
924926
throw cl::sycl::feature_not_supported();
925927
}
926928
#endif // __SYCL_DEVICE_ONLY__
929+
930+
/// @endcond ESIMD_DETAIL

0 commit comments

Comments
 (0)