Skip to content

Commit dbad62e

Browse files
committed
Add MaxNumAdditionalArgs comment
1 parent c6b8d77 commit dbad62e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sycl/source/detail/arg_extraction.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ inline namespace _V1 {
2424

2525
namespace detail {
2626

27+
// The argument can take up more space to store additional information about
28+
// MAccessRange, MMemoryRange, and MOffset added with addArgsForGlobalAccessor.
29+
// We use the worst-case estimate because the lifetime of the vector is short.
30+
// In processArg the kind_stream case introduces the maximum number of
31+
// additional arguments. The case adds additional 12 arguments to the currently
32+
// processed argument, hence worst-case estimate is 12+1=13.
33+
// TODO: the constant can be removed if the size of MArgs will be calculated at
34+
// compile time.
2735
inline constexpr size_t MaxNumAdditionalArgs = 13;
2836
constexpr static int AccessTargetMask = 0x7ff;
2937

0 commit comments

Comments
 (0)