From 09742ab4f50abeafa6a0cb40502b5de71cd6b637 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Thu, 15 Feb 2024 17:14:33 +0000 Subject: [PATCH] Try another fix --- ...neapi_spec_constant_length_alloca.asciidoc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_spec_constant_length_alloca.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_spec_constant_length_alloca.asciidoc index f4f6d7a87418f..7fd69803653ee 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_spec_constant_length_alloca.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_spec_constant_length_alloca.asciidoc @@ -103,7 +103,7 @@ implementation supports. This extension adds a new device aspect: -[source] +[source,c++] ---- namespace sycl { enum class aspect : /*unspecified*/ { @@ -117,7 +117,7 @@ The `ext_oneapi_scla` aspect indicates that the device is capable of using the === The SCLA API -[source] +[source,c++] ---- namespace sycl::ext::oneapi::experimental { template size(1); @@ -186,7 +186,7 @@ void run(queue q, const float *in, float *out, size_t n) { The following example is intended to clarify storage duration of memory allocated by `private_alloca`. -[source] +[source,c++] ---- constexpr specialization_id size(1); @@ -215,12 +215,12 @@ void run(queue q, const float *in, float *out, size_t n) { == Design Constraints The big design constraint stems from the unknown allocation size at compile -time. C++ does not support variable length arrays and complete type sizes must +time. C\+\+ does not support variable length arrays and complete type sizes must be known at compile time. Thus, the free function interface returning a pointer -to private memory is the better way to represent this construct in C++. Lifetime -of the underlying memory region was a concern too, but the current design with -automatic storage duration for the allocated memory region closely follows what -the user would get from a stack-allocated array. +to private memory is the better way to represent this construct in +C\+\+. Lifetime of the underlying memory region was a concern too, but the +current design with automatic storage duration for the allocated memory region +closely follows what the user would get from a stack-allocated array. == Issues @@ -245,7 +245,7 @@ used to query the *value* of specialization constants with `sycl::specialization_constant` class representing specialization constants would enable cleaner interfaces to this function like: -[source] +[source,c++] ---- namespace sycl::ext::oneapi::experimental { template