From ea393c18bf0bf2d76b4619a7f673baae287812dd Mon Sep 17 00:00:00 2001 From: David Medina Date: Thu, 28 Jan 2021 20:32:42 -0500 Subject: [PATCH] [Docs] Cleans up operator function signatures (#480) --- .doxygen | 2 +- docs/api/_sidebar.md | 1 + docs/api/device/_sidebar.md | 1 + docs/api/device/buildKernel.md | 16 +-- docs/api/device/buildKernel/_sidebar.md | 1 + docs/api/device/buildKernelFromString.md | 16 +-- .../device/buildKernelFromString/_sidebar.md | 1 + docs/api/device/constructor.md | 47 +++---- docs/api/device/constructor/_sidebar.md | 1 + docs/api/device/createStream.md | 16 +-- docs/api/device/createStream/_sidebar.md | 1 + docs/api/device/dontUseRefs.md | 7 +- docs/api/device/dontUseRefs/_sidebar.md | 1 + docs/api/device/finish.md | 7 +- docs/api/device/finish/_sidebar.md | 1 + docs/api/device/free.md | 7 +- docs/api/device/free/_sidebar.md | 1 + docs/api/device/getStream.md | 16 +-- docs/api/device/getStream/_sidebar.md | 1 + docs/api/device/hasSeparateMemorySpace.md | 16 +-- .../device/hasSeparateMemorySpace/_sidebar.md | 1 + docs/api/device/hash.md | 16 +-- docs/api/device/hash/_sidebar.md | 1 + docs/api/device/isInitialized.md | 16 +-- docs/api/device/isInitialized/_sidebar.md | 1 + docs/api/device/malloc.md | 76 ++++++++--- docs/api/device/malloc/_sidebar.md | 1 + docs/api/device/memoryAllocated.md | 7 +- docs/api/device/memoryAllocated/_sidebar.md | 1 + docs/api/device/memorySize.md | 7 +- docs/api/device/memorySize/_sidebar.md | 1 + docs/api/device/mode.md | 16 +-- docs/api/device/mode/_sidebar.md | 1 + docs/api/device/operator_equals.md | 33 ++--- docs/api/device/operator_equals/_sidebar.md | 1 + docs/api/device/properties.md | 7 +- docs/api/device/properties/_sidebar.md | 1 + docs/api/device/setStream.md | 7 +- docs/api/device/setStream/_sidebar.md | 1 + docs/api/device/setup.md | 14 +- docs/api/device/setup/_sidebar.md | 1 + docs/api/device/tagStream.md | 16 +-- docs/api/device/tagStream/_sidebar.md | 1 + docs/api/device/timeBetween.md | 16 +-- docs/api/device/timeBetween/_sidebar.md | 1 + docs/api/device/waitFor.md | 7 +- docs/api/device/waitFor/_sidebar.md | 1 + docs/api/device/wrapMemory.md | 30 ++--- docs/api/device/wrapMemory/_sidebar.md | 1 + docs/api/dtype_t/_sidebar.md | 1 + docs/api/function/_sidebar.md | 1 + docs/api/hash_t/_sidebar.md | 1 + docs/api/json/_sidebar.md | 1 + docs/api/json/asArray.md | 7 +- docs/api/json/asArray/_sidebar.md | 1 + docs/api/json/asBoolean.md | 7 +- docs/api/json/asBoolean/_sidebar.md | 1 + docs/api/json/asNull.md | 7 +- docs/api/json/asNull/_sidebar.md | 1 + docs/api/json/asNumber.md | 7 +- docs/api/json/asNumber/_sidebar.md | 1 + docs/api/json/asObject.md | 7 +- docs/api/json/asObject/_sidebar.md | 1 + docs/api/json/asString.md | 7 +- docs/api/json/asString/_sidebar.md | 1 + docs/api/json/dump.md | 7 +- docs/api/json/dump/_sidebar.md | 1 + docs/api/json/isArray.md | 7 +- docs/api/json/isArray/_sidebar.md | 1 + docs/api/json/isBool.md | 7 +- docs/api/json/isBool/_sidebar.md | 1 + docs/api/json/isNull.md | 7 +- docs/api/json/isNull/_sidebar.md | 1 + docs/api/json/isNumber.md | 7 +- docs/api/json/isNumber/_sidebar.md | 1 + docs/api/json/isObject.md | 7 +- docs/api/json/isObject/_sidebar.md | 1 + docs/api/json/isString.md | 7 +- docs/api/json/isString/_sidebar.md | 1 + docs/api/json/operator_brackets.md | 9 +- docs/api/json/operator_brackets/_sidebar.md | 1 + docs/api/json/parse.md | 7 +- docs/api/json/parse/_sidebar.md | 1 + docs/api/json/read.md | 7 +- docs/api/json/read/_sidebar.md | 1 + docs/api/json/set.md | 7 +- docs/api/json/set/_sidebar.md | 1 + docs/api/json/write.md | 7 +- docs/api/json/write/_sidebar.md | 1 + docs/api/kernel/_sidebar.md | 1 + docs/api/kernel/free.md | 7 +- docs/api/kernel/free/_sidebar.md | 1 + docs/api/kernel/operator_parentheses.md | 9 +- .../kernel/operator_parentheses/_sidebar.md | 1 + docs/api/kernel/run.md | 7 +- docs/api/kernel/run/_sidebar.md | 1 + docs/api/kernelArg.md | 13 ++ docs/api/kernelArg/_sidebar.md | 20 +++ docs/api/memory/_sidebar.md | 1 + docs/api/memory/cast.md | 7 +- docs/api/memory/cast/_sidebar.md | 1 + docs/api/memory/clone.md | 7 +- docs/api/memory/clone/_sidebar.md | 1 + docs/api/memory/constructor.md | 9 +- docs/api/memory/constructor/_sidebar.md | 1 + docs/api/memory/copyFrom.md | 7 +- docs/api/memory/copyFrom/_sidebar.md | 1 + docs/api/memory/copyTo.md | 7 +- docs/api/memory/copyTo/_sidebar.md | 1 + docs/api/memory/free.md | 7 +- docs/api/memory/free/_sidebar.md | 1 + docs/api/memory/ptr.md | 7 +- docs/api/memory/ptr/_sidebar.md | 1 + docs/api/memory/slice.md | 7 +- docs/api/memory/slice/_sidebar.md | 1 + docs/api/stream/_sidebar.md | 1 + docs/api/streamTag/_sidebar.md | 1 + docs/assets/occa.css | 6 +- docs/assets/occa.js | 2 +- include/occa/core/kernel.hpp | 3 + include/occa/core/kernelArg.hpp | 8 ++ scripts/docs/api_docgen/markdown.py | 2 +- scripts/docs/api_docgen/types.py | 121 ++++++++++++------ 123 files changed, 461 insertions(+), 403 deletions(-) create mode 100644 docs/api/kernelArg.md create mode 100644 docs/api/kernelArg/_sidebar.md diff --git a/.doxygen b/.doxygen index 92394d19e..2ea1ba818 100644 --- a/.doxygen +++ b/.doxygen @@ -31,7 +31,7 @@ ALIASES += rawXmlEnd="]]>" ALIASES += startDoc{1}="\xmlonly @rawXmlStart " ALIASES += endDoc=" @rawXmlEnd \endxmlonly" -ALIASES += doc="\xmlonly \endxmlonly" +ALIASES += doc{1}="\xmlonly \endxmlonly" #======================================= diff --git a/docs/api/_sidebar.md b/docs/api/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/_sidebar.md +++ b/docs/api/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/device/_sidebar.md b/docs/api/device/_sidebar.md index c0a0b1c2e..0fd12ea70 100644 --- a/docs/api/device/_sidebar.md +++ b/docs/api/device/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/buildKernel.md b/docs/api/device/buildKernel.md index 6f1996922..4ec5ff81e 100644 --- a/docs/api/device/buildKernel.md +++ b/docs/api/device/buildKernel.md @@ -6,32 +6,26 @@
-
- +
+
occa::kernel buildKernel(const std::string &filename, const std::string &kernelName, const occa::json &props)
- Source + Source
Returns
    -
  • - ::: markdown - The compiled [occa::kernel](/api/kernel/). - ::: -
  • +
  • ::: markdown The compiled [occa::kernel](/api/kernel/). :::
-
- +
-
diff --git a/docs/api/device/buildKernel/_sidebar.md b/docs/api/device/buildKernel/_sidebar.md index 3f3e64605..1305c59b9 100644 --- a/docs/api/device/buildKernel/_sidebar.md +++ b/docs/api/device/buildKernel/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/buildKernelFromString.md b/docs/api/device/buildKernelFromString.md index dca92cc07..320cc0bc2 100644 --- a/docs/api/device/buildKernelFromString.md +++ b/docs/api/device/buildKernelFromString.md @@ -6,32 +6,26 @@
-
- +
+
occa::kernel buildKernelFromString(const std::string &content, const std::string &kernelName, const occa::json &props)
- Source + Source
Returns
    -
  • - ::: markdown - The compiled [occa::kernel](/api/kernel/). - ::: -
  • +
  • ::: markdown The compiled [occa::kernel](/api/kernel/). :::
-
- +
-
diff --git a/docs/api/device/buildKernelFromString/_sidebar.md b/docs/api/device/buildKernelFromString/_sidebar.md index f1d2790ca..b697e0fcb 100644 --- a/docs/api/device/buildKernelFromString/_sidebar.md +++ b/docs/api/device/buildKernelFromString/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/constructor.md b/docs/api/device/constructor.md index 8fe904de5..73b1be0e2 100644 --- a/docs/api/device/constructor.md +++ b/docs/api/device/constructor.md @@ -6,84 +6,73 @@
-
- +
+
- device() + device()
- Source + Source
- ::: markdown - Default constructor - ::: + ::: markdown Default constructor :::
- +
-
+
- device(const std::string &props) + device(const std::string &props)
- Source + Source
- ::: markdown - Takes a JSON-formatted string for the device props. - ::: + ::: markdown Takes a JSON-formatted string for the device props. :::
Arguments
  • - props: ::: markdown - JSON-formatted string that defines the device properties - ::: + props: ::: markdown JSON-formatted string that defines the device properties :::
- +
-
+
- device(const occa::json &props) + device(const occa::json &props)
- Source + Source
- ::: markdown - Takes an [occa::json](/api/json/) argument for the device props. - ::: + ::: markdown Takes an [occa::json](/api/json/) argument for the device props. :::
Arguments
  • - props: ::: markdown - Device properties - ::: + props: ::: markdown Device properties :::
- +
-
diff --git a/docs/api/device/constructor/_sidebar.md b/docs/api/device/constructor/_sidebar.md index d33687c7d..8f82a203a 100644 --- a/docs/api/device/constructor/_sidebar.md +++ b/docs/api/device/constructor/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/createStream.md b/docs/api/device/createStream.md index d5f30da16..7d87938e1 100644 --- a/docs/api/device/createStream.md +++ b/docs/api/device/createStream.md @@ -6,30 +6,24 @@
-
- +
+
occa::stream createStream(const occa::json &props)
- Source + Source
Returns
    -
  • - ::: markdown - Newly created [occa::stream](/api/stream) - ::: -
  • +
  • ::: markdown Newly created [occa::stream](/api/stream) :::
-
- +
-
diff --git a/docs/api/device/createStream/_sidebar.md b/docs/api/device/createStream/_sidebar.md index bf46c3d9a..6730ad85d 100644 --- a/docs/api/device/createStream/_sidebar.md +++ b/docs/api/device/createStream/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/dontUseRefs.md b/docs/api/device/dontUseRefs.md index 7fd0d02c6..3be78067b 100644 --- a/docs/api/device/dontUseRefs.md +++ b/docs/api/device/dontUseRefs.md @@ -6,19 +6,18 @@
-
- +
+
void dontUseRefs()
- Source + Source
-
diff --git a/docs/api/device/dontUseRefs/_sidebar.md b/docs/api/device/dontUseRefs/_sidebar.md index 446144988..6597990c2 100644 --- a/docs/api/device/dontUseRefs/_sidebar.md +++ b/docs/api/device/dontUseRefs/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/finish.md b/docs/api/device/finish.md index e1e0d533d..44648ce8f 100644 --- a/docs/api/device/finish.md +++ b/docs/api/device/finish.md @@ -6,19 +6,18 @@
-
- +
+
void finish()
- Source + Source
-
diff --git a/docs/api/device/finish/_sidebar.md b/docs/api/device/finish/_sidebar.md index 006e6530b..e7171538b 100644 --- a/docs/api/device/finish/_sidebar.md +++ b/docs/api/device/finish/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/free.md b/docs/api/device/free.md index af8706466..baf9bfcbb 100644 --- a/docs/api/device/free.md +++ b/docs/api/device/free.md @@ -6,19 +6,18 @@
-
- +
+
void free()
- Source + Source
-
diff --git a/docs/api/device/free/_sidebar.md b/docs/api/device/free/_sidebar.md index d8d4466e9..aa1da1f07 100644 --- a/docs/api/device/free/_sidebar.md +++ b/docs/api/device/free/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/getStream.md b/docs/api/device/getStream.md index 12fedf241..9db038e37 100644 --- a/docs/api/device/getStream.md +++ b/docs/api/device/getStream.md @@ -6,30 +6,24 @@
-
- +
+
occa::stream getStream()
- Source + Source
Returns
    -
  • - ::: markdown - Returns the active [occa::stream](/api/stream). - ::: -
  • +
  • ::: markdown Returns the active [occa::stream](/api/stream). :::
-
- +
-
diff --git a/docs/api/device/getStream/_sidebar.md b/docs/api/device/getStream/_sidebar.md index 81f4eaa23..d966220d0 100644 --- a/docs/api/device/getStream/_sidebar.md +++ b/docs/api/device/getStream/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/hasSeparateMemorySpace.md b/docs/api/device/hasSeparateMemorySpace.md index d04eae9e2..f3d8d79de 100644 --- a/docs/api/device/hasSeparateMemorySpace.md +++ b/docs/api/device/hasSeparateMemorySpace.md @@ -6,30 +6,24 @@
-
- +
+
bool hasSeparateMemorySpace()
- Source + Source
Returns
    -
  • - ::: markdown - Returns `true` if the memory is directly accesible through the host. - ::: -
  • +
  • ::: markdown Returns `true` if the memory is directly accesible through the host. :::
-
- +
-
diff --git a/docs/api/device/hasSeparateMemorySpace/_sidebar.md b/docs/api/device/hasSeparateMemorySpace/_sidebar.md index 4a81604bb..89e7f8ed0 100644 --- a/docs/api/device/hasSeparateMemorySpace/_sidebar.md +++ b/docs/api/device/hasSeparateMemorySpace/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/hash.md b/docs/api/device/hash.md index 424def38f..2d2d553ae 100644 --- a/docs/api/device/hash.md +++ b/docs/api/device/hash.md @@ -6,30 +6,24 @@
-
- +
+
Returns
    -
  • - ::: markdown - The device [hash](/api/hash_t) - ::: -
  • +
  • ::: markdown The device [hash](/api/hash_t) :::
-
- +
-
diff --git a/docs/api/device/hash/_sidebar.md b/docs/api/device/hash/_sidebar.md index 2c7679a21..9aa722bd9 100644 --- a/docs/api/device/hash/_sidebar.md +++ b/docs/api/device/hash/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/isInitialized.md b/docs/api/device/isInitialized.md index 61cda0790..94f1d430c 100644 --- a/docs/api/device/isInitialized.md +++ b/docs/api/device/isInitialized.md @@ -6,30 +6,24 @@
-
- +
+
bool isInitialized()
- Source + Source
Returns
    -
  • - ::: markdown - Returns `true` if the device has been intialized, through either the [(constructor)](/api/device/constructor) or [setup](/api/device/setup). - ::: -
  • +
  • ::: markdown Returns `true` if the device has been intialized, through either the [(constructor)](/api/device/constructor) or [setup](/api/device/setup). :::
-
- +
-
diff --git a/docs/api/device/isInitialized/_sidebar.md b/docs/api/device/isInitialized/_sidebar.md index c0f8db5c1..316e9659d 100644 --- a/docs/api/device/isInitialized/_sidebar.md +++ b/docs/api/device/isInitialized/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/malloc.md b/docs/api/device/malloc.md index bfb8921ce..c1af54403 100644 --- a/docs/api/device/malloc.md +++ b/docs/api/device/malloc.md @@ -6,9 +6,9 @@
-
- +
+
template <class T> @@ -16,29 +16,45 @@ const void *src, const occa::json &props)
- Source + Source +
+ +
+ +
+
+ template <class T> +occa::memory malloc(const dim_t entries, + const occa::memory src, + const occa::json &props) +
+ Source +
+ +
+ +
+
+ template <class T> +occa::memory malloc(const dim_t entries, + const occa::json &props) +
+ Source
- ::: markdown - Uses the templated type to determine the type and bytes. - ::: + ::: markdown Uses the templated type to determine the type and bytes. :::
Returns
    -
  • - ::: markdown - The allocated [occa::memory](/api/memory/) - ::: -
  • +
  • ::: markdown The allocated [occa::memory](/api/memory/) :::
-
- +
-
+
@@ -47,19 +63,39 @@ const void *src, const occa::json &props)
- Source + Source +
+ +
+ +
+
+ occa::memory malloc(const dim_t entries, + const occa::dtype_t &dtype, + const occa::memory src, + const occa::json &props) +
+ Source +
+ +
+ +
+
+ occa::memory malloc(const dim_t entries, + const occa::dtype_t &dtype, + const occa::json &props) +
+ Source
- ::: markdown - Same but takes a [occa::dtype_t](/api/dtype_t) rather than a template parameter. - ::: + ::: markdown Same but takes a [occa::dtype_t](/api/dtype_t) rather than a template parameter. :::
- +
-
diff --git a/docs/api/device/malloc/_sidebar.md b/docs/api/device/malloc/_sidebar.md index 7c2326177..48e5c4f4b 100644 --- a/docs/api/device/malloc/_sidebar.md +++ b/docs/api/device/malloc/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/memoryAllocated.md b/docs/api/device/memoryAllocated.md index 18a7f0c96..6170d9e46 100644 --- a/docs/api/device/memoryAllocated.md +++ b/docs/api/device/memoryAllocated.md @@ -6,19 +6,18 @@
-
- +
+
udim_t memoryAllocated()
- Source + Source
-
diff --git a/docs/api/device/memoryAllocated/_sidebar.md b/docs/api/device/memoryAllocated/_sidebar.md index fcaa1be45..c89ecaf7b 100644 --- a/docs/api/device/memoryAllocated/_sidebar.md +++ b/docs/api/device/memoryAllocated/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/memorySize.md b/docs/api/device/memorySize.md index c74c36f50..d57b2eab2 100644 --- a/docs/api/device/memorySize.md +++ b/docs/api/device/memorySize.md @@ -6,19 +6,18 @@
-
- +
+
udim_t memorySize()
- Source + Source
-
diff --git a/docs/api/device/memorySize/_sidebar.md b/docs/api/device/memorySize/_sidebar.md index 886eb9fd4..c2839e83f 100644 --- a/docs/api/device/memorySize/_sidebar.md +++ b/docs/api/device/memorySize/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/mode.md b/docs/api/device/mode.md index ac781127d..b3f7c4c40 100644 --- a/docs/api/device/mode.md +++ b/docs/api/device/mode.md @@ -6,30 +6,24 @@
-
- +
+
const std::string& mode()
- Source + Source
Returns
    -
  • - ::: markdown - The `mode` string, such as `"Serial"`, `"CUDA"`, or `"HIP"`. - ::: -
  • +
  • ::: markdown The `mode` string, such as `"Serial"`, `"CUDA"`, or `"HIP"`. :::
-
- +
-
diff --git a/docs/api/device/mode/_sidebar.md b/docs/api/device/mode/_sidebar.md index 608889c19..5d0987b04 100644 --- a/docs/api/device/mode/_sidebar.md +++ b/docs/api/device/mode/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/operator_equals.md b/docs/api/device/operator_equals.md index acec121ea..3bf00fe6f 100644 --- a/docs/api/device/operator_equals.md +++ b/docs/api/device/operator_equals.md @@ -6,52 +6,41 @@
-
- +
+
- bool operator==(const occa::device &other) + bool operator == (const occa::device &other)
- Source + Source
Returns
    -
  • - ::: markdown - If the references are the same, this returns `true` otherwise `false`. - ::: -
  • +
  • ::: markdown If the references are the same, this returns `true` otherwise `false`. :::
-
- +
-
+
- bool operator!=(const occa::device &other) + bool operator != (const occa::device &other)
- Source + Source
Returns
    -
  • - ::: markdown - If the references are different, this returns `true` otherwise `false`. - ::: -
  • +
  • ::: markdown If the references are different, this returns `true` otherwise `false`. :::
-
- +
-
diff --git a/docs/api/device/operator_equals/_sidebar.md b/docs/api/device/operator_equals/_sidebar.md index 92b490682..dfcc0d65a 100644 --- a/docs/api/device/operator_equals/_sidebar.md +++ b/docs/api/device/operator_equals/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/properties.md b/docs/api/device/properties.md index ac9da9894..44d866e78 100644 --- a/docs/api/device/properties.md +++ b/docs/api/device/properties.md @@ -6,19 +6,18 @@
-
- +
+
const occa::json& properties()
- Source + Source
-
diff --git a/docs/api/device/properties/_sidebar.md b/docs/api/device/properties/_sidebar.md index f0a505924..b9add484d 100644 --- a/docs/api/device/properties/_sidebar.md +++ b/docs/api/device/properties/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/setStream.md b/docs/api/device/setStream.md index dd6d18895..e29111d35 100644 --- a/docs/api/device/setStream.md +++ b/docs/api/device/setStream.md @@ -6,19 +6,18 @@
-
- +
+
void setStream(occa::stream s)
- Source + Source
-
diff --git a/docs/api/device/setStream/_sidebar.md b/docs/api/device/setStream/_sidebar.md index 5240d3dfb..2f8ee90e5 100644 --- a/docs/api/device/setStream/_sidebar.md +++ b/docs/api/device/setStream/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/setup.md b/docs/api/device/setup.md index 149b73e15..1d2942383 100644 --- a/docs/api/device/setup.md +++ b/docs/api/device/setup.md @@ -6,18 +6,26 @@
-
- +
+
void setup(const std::string &props)
- Source + Source
+
+
+ void setup(const occa::json &props) +
+ Source +
+ +

diff --git a/docs/api/device/setup/_sidebar.md b/docs/api/device/setup/_sidebar.md index 10874c89c..ba161aad4 100644 --- a/docs/api/device/setup/_sidebar.md +++ b/docs/api/device/setup/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/tagStream.md b/docs/api/device/tagStream.md index c2a67ad03..67e6f6159 100644 --- a/docs/api/device/tagStream.md +++ b/docs/api/device/tagStream.md @@ -6,30 +6,24 @@
-
- +
+
occa::streamTag tagStream()
- Source + Source
Returns
    -
  • - ::: markdown - The created [occa::streamTag](/api/streamTag). - ::: -
  • +
  • ::: markdown The created [occa::streamTag](/api/streamTag). :::
-
- +
-
diff --git a/docs/api/device/tagStream/_sidebar.md b/docs/api/device/tagStream/_sidebar.md index c2ada2814..8c420b81a 100644 --- a/docs/api/device/tagStream/_sidebar.md +++ b/docs/api/device/tagStream/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/timeBetween.md b/docs/api/device/timeBetween.md index f1022c97a..c271e43cb 100644 --- a/docs/api/device/timeBetween.md +++ b/docs/api/device/timeBetween.md @@ -6,31 +6,25 @@
-
- +
+
double timeBetween(const occa::streamTag &startTag, const occa::streamTag &endTag)
- Source + Source
Returns
    -
  • - ::: markdown - Returns the time in seconds. - ::: -
  • +
  • ::: markdown Returns the time in seconds. :::
-
- +
-
diff --git a/docs/api/device/timeBetween/_sidebar.md b/docs/api/device/timeBetween/_sidebar.md index 2b5a12ee1..ce103236d 100644 --- a/docs/api/device/timeBetween/_sidebar.md +++ b/docs/api/device/timeBetween/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/waitFor.md b/docs/api/device/waitFor.md index 6b7bde884..84a6c2d3a 100644 --- a/docs/api/device/waitFor.md +++ b/docs/api/device/waitFor.md @@ -6,19 +6,18 @@
-
- +
+
void waitFor(occa::streamTag tag)
- Source + Source
-
diff --git a/docs/api/device/waitFor/_sidebar.md b/docs/api/device/waitFor/_sidebar.md index 4eeb5ddd2..4c2b54e72 100644 --- a/docs/api/device/waitFor/_sidebar.md +++ b/docs/api/device/waitFor/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/device/wrapMemory.md b/docs/api/device/wrapMemory.md index 215189be2..f69e28d8f 100644 --- a/docs/api/device/wrapMemory.md +++ b/docs/api/device/wrapMemory.md @@ -6,9 +6,9 @@
-
- +
+
template <class T> @@ -16,29 +16,22 @@ const dim_t entries, const occa::json &props)
- Source + Source
- ::: markdown - Uses the templated type to determine the type and bytes. - ::: + ::: markdown Uses the templated type to determine the type and bytes. :::
Returns
    -
  • - ::: markdown - The wrapped [occa::memory](/api/memory/) - ::: -
  • +
  • ::: markdown The wrapped [occa::memory](/api/memory/) :::
-
- +
-
+
@@ -47,19 +40,16 @@ const occa::dtype_t &dtype, const occa::json &props)
- Source + Source
- ::: markdown - Same but takes a [occa::dtype_t](/api/dtype_t) rather than a template parameter. - ::: + ::: markdown Same but takes a [occa::dtype_t](/api/dtype_t) rather than a template parameter. :::
- +
-
diff --git a/docs/api/device/wrapMemory/_sidebar.md b/docs/api/device/wrapMemory/_sidebar.md index c0a0b1c2e..0fd12ea70 100644 --- a/docs/api/device/wrapMemory/_sidebar.md +++ b/docs/api/device/wrapMemory/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [(constructor)](/api/device/constructor) diff --git a/docs/api/dtype_t/_sidebar.md b/docs/api/dtype_t/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/dtype_t/_sidebar.md +++ b/docs/api/dtype_t/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/function/_sidebar.md b/docs/api/function/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/function/_sidebar.md +++ b/docs/api/function/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/hash_t/_sidebar.md b/docs/api/hash_t/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/hash_t/_sidebar.md +++ b/docs/api/hash_t/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/_sidebar.md b/docs/api/json/_sidebar.md index ebeec73da..95ba8fd94 100644 --- a/docs/api/json/_sidebar.md +++ b/docs/api/json/_sidebar.md @@ -28,6 +28,7 @@ - [set](/api/json/set) - [write](/api/json/write) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asArray.md b/docs/api/json/asArray.md index a30aacdf9..bff930746 100644 --- a/docs/api/json/asArray.md +++ b/docs/api/json/asArray.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asArray()
- Source + Source
-
diff --git a/docs/api/json/asArray/_sidebar.md b/docs/api/json/asArray/_sidebar.md index d8a778e95..edc425c6b 100644 --- a/docs/api/json/asArray/_sidebar.md +++ b/docs/api/json/asArray/_sidebar.md @@ -11,6 +11,7 @@ - [occa::json](/api/json/) - [asArray](/api/json/asArray) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asBoolean.md b/docs/api/json/asBoolean.md index fbfee3c4e..27d92c013 100644 --- a/docs/api/json/asBoolean.md +++ b/docs/api/json/asBoolean.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asBoolean()
- Source + Source
-
diff --git a/docs/api/json/asBoolean/_sidebar.md b/docs/api/json/asBoolean/_sidebar.md index 8b5b75521..1d5a7e98d 100644 --- a/docs/api/json/asBoolean/_sidebar.md +++ b/docs/api/json/asBoolean/_sidebar.md @@ -12,6 +12,7 @@ - [asArray](/api/json/asArray) - [asBoolean](/api/json/asBoolean) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asNull.md b/docs/api/json/asNull.md index b100232a0..a650c0ee4 100644 --- a/docs/api/json/asNull.md +++ b/docs/api/json/asNull.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asNull()
- Source + Source
-
diff --git a/docs/api/json/asNull/_sidebar.md b/docs/api/json/asNull/_sidebar.md index 94df117b9..cf2f5af5d 100644 --- a/docs/api/json/asNull/_sidebar.md +++ b/docs/api/json/asNull/_sidebar.md @@ -13,6 +13,7 @@ - [asBoolean](/api/json/asBoolean) - [asNull](/api/json/asNull) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asNumber.md b/docs/api/json/asNumber.md index f85983c5c..67e9e06de 100644 --- a/docs/api/json/asNumber.md +++ b/docs/api/json/asNumber.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asNumber()
- Source + Source
-
diff --git a/docs/api/json/asNumber/_sidebar.md b/docs/api/json/asNumber/_sidebar.md index f0854eb7c..1625fc07a 100644 --- a/docs/api/json/asNumber/_sidebar.md +++ b/docs/api/json/asNumber/_sidebar.md @@ -14,6 +14,7 @@ - [asNull](/api/json/asNull) - [asNumber](/api/json/asNumber) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asObject.md b/docs/api/json/asObject.md index 9c4a38b4f..989cf0982 100644 --- a/docs/api/json/asObject.md +++ b/docs/api/json/asObject.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asObject()
- Source + Source
-
diff --git a/docs/api/json/asObject/_sidebar.md b/docs/api/json/asObject/_sidebar.md index 9b0d0d828..e6d9121fa 100644 --- a/docs/api/json/asObject/_sidebar.md +++ b/docs/api/json/asObject/_sidebar.md @@ -15,6 +15,7 @@ - [asNumber](/api/json/asNumber) - [asObject](/api/json/asObject) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/asString.md b/docs/api/json/asString.md index a91919394..4fa9ac988 100644 --- a/docs/api/json/asString.md +++ b/docs/api/json/asString.md @@ -6,19 +6,18 @@
-
- +
+
occa::json& asString()
- Source + Source
-
diff --git a/docs/api/json/asString/_sidebar.md b/docs/api/json/asString/_sidebar.md index 2a0c64fed..c43e094f5 100644 --- a/docs/api/json/asString/_sidebar.md +++ b/docs/api/json/asString/_sidebar.md @@ -16,6 +16,7 @@ - [asObject](/api/json/asObject) - [asString](/api/json/asString) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/dump.md b/docs/api/json/dump.md index d8a514748..19361e375 100644 --- a/docs/api/json/dump.md +++ b/docs/api/json/dump.md @@ -6,19 +6,18 @@
-
- +
+
std::string dump(const int indent)
- Source + Source
-
diff --git a/docs/api/json/dump/_sidebar.md b/docs/api/json/dump/_sidebar.md index 33592846f..8af86d343 100644 --- a/docs/api/json/dump/_sidebar.md +++ b/docs/api/json/dump/_sidebar.md @@ -17,6 +17,7 @@ - [asString](/api/json/asString) - [dump](/api/json/dump) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isArray.md b/docs/api/json/isArray.md index 3f94e9373..29ed11370 100644 --- a/docs/api/json/isArray.md +++ b/docs/api/json/isArray.md @@ -6,19 +6,18 @@
-
- +
+
bool isArray()
- Source + Source
-
diff --git a/docs/api/json/isArray/_sidebar.md b/docs/api/json/isArray/_sidebar.md index 262b7a489..02302f9d4 100644 --- a/docs/api/json/isArray/_sidebar.md +++ b/docs/api/json/isArray/_sidebar.md @@ -18,6 +18,7 @@ - [dump](/api/json/dump) - [isArray](/api/json/isArray) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isBool.md b/docs/api/json/isBool.md index 32543fa29..4412cf4c7 100644 --- a/docs/api/json/isBool.md +++ b/docs/api/json/isBool.md @@ -6,19 +6,18 @@
-
- +
+
bool isBool()
- Source + Source
-
diff --git a/docs/api/json/isBool/_sidebar.md b/docs/api/json/isBool/_sidebar.md index 39faf3500..5f7a02589 100644 --- a/docs/api/json/isBool/_sidebar.md +++ b/docs/api/json/isBool/_sidebar.md @@ -19,6 +19,7 @@ - [isArray](/api/json/isArray) - [isBool](/api/json/isBool) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isNull.md b/docs/api/json/isNull.md index 240b48f8f..7d27ad4b1 100644 --- a/docs/api/json/isNull.md +++ b/docs/api/json/isNull.md @@ -6,19 +6,18 @@
-
- +
+
bool isNull()
- Source + Source
-
diff --git a/docs/api/json/isNull/_sidebar.md b/docs/api/json/isNull/_sidebar.md index 06a736794..45bca8875 100644 --- a/docs/api/json/isNull/_sidebar.md +++ b/docs/api/json/isNull/_sidebar.md @@ -20,6 +20,7 @@ - [isBool](/api/json/isBool) - [isNull](/api/json/isNull) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isNumber.md b/docs/api/json/isNumber.md index 564a700a3..2a589fc45 100644 --- a/docs/api/json/isNumber.md +++ b/docs/api/json/isNumber.md @@ -6,19 +6,18 @@
-
- +
+
bool isNumber()
- Source + Source
-
diff --git a/docs/api/json/isNumber/_sidebar.md b/docs/api/json/isNumber/_sidebar.md index 50181ed75..875cf7463 100644 --- a/docs/api/json/isNumber/_sidebar.md +++ b/docs/api/json/isNumber/_sidebar.md @@ -21,6 +21,7 @@ - [isNull](/api/json/isNull) - [isNumber](/api/json/isNumber) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isObject.md b/docs/api/json/isObject.md index bd678b55b..03d1e7a52 100644 --- a/docs/api/json/isObject.md +++ b/docs/api/json/isObject.md @@ -6,19 +6,18 @@
-
- +
+
bool isObject()
- Source + Source
-
diff --git a/docs/api/json/isObject/_sidebar.md b/docs/api/json/isObject/_sidebar.md index 30584614f..abae2ea06 100644 --- a/docs/api/json/isObject/_sidebar.md +++ b/docs/api/json/isObject/_sidebar.md @@ -22,6 +22,7 @@ - [isNumber](/api/json/isNumber) - [isObject](/api/json/isObject) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/isString.md b/docs/api/json/isString.md index 6ed974cfa..2ff19f2ac 100644 --- a/docs/api/json/isString.md +++ b/docs/api/json/isString.md @@ -6,19 +6,18 @@
-
- +
+
bool isString()
- Source + Source
-
diff --git a/docs/api/json/isString/_sidebar.md b/docs/api/json/isString/_sidebar.md index cc14a388a..f9badea5c 100644 --- a/docs/api/json/isString/_sidebar.md +++ b/docs/api/json/isString/_sidebar.md @@ -23,6 +23,7 @@ - [isObject](/api/json/isObject) - [isString](/api/json/isString) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/operator_brackets.md b/docs/api/json/operator_brackets.md index 0d9a116d4..19cde5a59 100644 --- a/docs/api/json/operator_brackets.md +++ b/docs/api/json/operator_brackets.md @@ -6,19 +6,18 @@
-
- +
+
- occa::json& operator[](const std::string &s) + occa::json& operator [] (const std::string &s)
- Source + Source
-
diff --git a/docs/api/json/operator_brackets/_sidebar.md b/docs/api/json/operator_brackets/_sidebar.md index cc03ae13c..238d30c42 100644 --- a/docs/api/json/operator_brackets/_sidebar.md +++ b/docs/api/json/operator_brackets/_sidebar.md @@ -24,6 +24,7 @@ - [isString](/api/json/isString) - [operator []](/api/json/operator_brackets) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/parse.md b/docs/api/json/parse.md index 55c26cc1d..bf6fe9cb1 100644 --- a/docs/api/json/parse.md +++ b/docs/api/json/parse.md @@ -6,19 +6,18 @@
-
- +
+
occa::json parse(const char *&c)
- Source + Source
-
diff --git a/docs/api/json/parse/_sidebar.md b/docs/api/json/parse/_sidebar.md index 9e9df9b24..07f7b844e 100644 --- a/docs/api/json/parse/_sidebar.md +++ b/docs/api/json/parse/_sidebar.md @@ -25,6 +25,7 @@ - [operator []](/api/json/operator_brackets) - [parse](/api/json/parse) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/read.md b/docs/api/json/read.md index e1f0119eb..f9b7950fe 100644 --- a/docs/api/json/read.md +++ b/docs/api/json/read.md @@ -6,19 +6,18 @@
-
- +
+
occa::json read(const std::string &filename)
- Source + Source
-
diff --git a/docs/api/json/read/_sidebar.md b/docs/api/json/read/_sidebar.md index f56aa7d59..670c2021d 100644 --- a/docs/api/json/read/_sidebar.md +++ b/docs/api/json/read/_sidebar.md @@ -26,6 +26,7 @@ - [parse](/api/json/parse) - [read](/api/json/read) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/set.md b/docs/api/json/set.md index 67653e25e..1db43afab 100644 --- a/docs/api/json/set.md +++ b/docs/api/json/set.md @@ -6,21 +6,20 @@
-
- +
+
template <class T> occa::json& set(const char *key, const T &value)
- Source + Source
-
diff --git a/docs/api/json/set/_sidebar.md b/docs/api/json/set/_sidebar.md index cc932cbae..56a7c41d9 100644 --- a/docs/api/json/set/_sidebar.md +++ b/docs/api/json/set/_sidebar.md @@ -27,6 +27,7 @@ - [read](/api/json/read) - [set](/api/json/set) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/json/write.md b/docs/api/json/write.md index 3c25a9e2c..5882ba374 100644 --- a/docs/api/json/write.md +++ b/docs/api/json/write.md @@ -6,19 +6,18 @@
-
- +
+
void write(const std::string &filename)
- Source + Source
-
diff --git a/docs/api/json/write/_sidebar.md b/docs/api/json/write/_sidebar.md index ebeec73da..95ba8fd94 100644 --- a/docs/api/json/write/_sidebar.md +++ b/docs/api/json/write/_sidebar.md @@ -28,6 +28,7 @@ - [set](/api/json/set) - [write](/api/json/write) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/kernel/_sidebar.md b/docs/api/kernel/_sidebar.md index 3af0cd82b..a957b1486 100644 --- a/docs/api/kernel/_sidebar.md +++ b/docs/api/kernel/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [free](/api/kernel/free) - [operator ()](/api/kernel/operator_parentheses) diff --git a/docs/api/kernel/free.md b/docs/api/kernel/free.md index 4a4252b6f..0ec09200b 100644 --- a/docs/api/kernel/free.md +++ b/docs/api/kernel/free.md @@ -6,19 +6,18 @@
-
- +
+
void free()
- Source + Source
-
diff --git a/docs/api/kernel/free/_sidebar.md b/docs/api/kernel/free/_sidebar.md index 9aa65e097..1ec140872 100644 --- a/docs/api/kernel/free/_sidebar.md +++ b/docs/api/kernel/free/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [free](/api/kernel/free) - [occa::device](/api/device/) diff --git a/docs/api/kernel/operator_parentheses.md b/docs/api/kernel/operator_parentheses.md index 117183c9e..45ee541c0 100644 --- a/docs/api/kernel/operator_parentheses.md +++ b/docs/api/kernel/operator_parentheses.md @@ -6,19 +6,18 @@
-
- +
+
- void operator()() + void operator () ([occa::kernelArg](/api/kernelArg)... args)
- Source + Source
-
diff --git a/docs/api/kernel/operator_parentheses/_sidebar.md b/docs/api/kernel/operator_parentheses/_sidebar.md index 4038d1a6e..99a7edce6 100644 --- a/docs/api/kernel/operator_parentheses/_sidebar.md +++ b/docs/api/kernel/operator_parentheses/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [free](/api/kernel/free) - [operator ()](/api/kernel/operator_parentheses) diff --git a/docs/api/kernel/run.md b/docs/api/kernel/run.md index 8e6ad9d49..36d1532b2 100644 --- a/docs/api/kernel/run.md +++ b/docs/api/kernel/run.md @@ -6,19 +6,18 @@
-
- +
+
void run()
- Source + Source
-
diff --git a/docs/api/kernel/run/_sidebar.md b/docs/api/kernel/run/_sidebar.md index 3af0cd82b..a957b1486 100644 --- a/docs/api/kernel/run/_sidebar.md +++ b/docs/api/kernel/run/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [free](/api/kernel/free) - [operator ()](/api/kernel/operator_parentheses) diff --git a/docs/api/kernelArg.md b/docs/api/kernelArg.md new file mode 100644 index 000000000..698ecd323 --- /dev/null +++ b/docs/api/kernelArg.md @@ -0,0 +1,13 @@ +

+ + occa::kernelArg + +

+ +

+ + Description + +

+ +TODO \ No newline at end of file diff --git a/docs/api/kernelArg/_sidebar.md b/docs/api/kernelArg/_sidebar.md new file mode 100644 index 000000000..b0fd59e9f --- /dev/null +++ b/docs/api/kernelArg/_sidebar.md @@ -0,0 +1,20 @@ +
+ + +
+ +- [**API**](/api/) + - [occa::json](/api/json/) + - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) + - [occa::kernel](/api/kernel/) + - [occa::device](/api/device/) + - [occa::function](/api/function) + - [occa::stream](/api/stream) + - [occa::dtype_t](/api/dtype_t) + - [occa::memory](/api/memory/) + - [occa::streamTag](/api/streamTag) diff --git a/docs/api/memory/_sidebar.md b/docs/api/memory/_sidebar.md index d20d8548d..596c2ff3f 100644 --- a/docs/api/memory/_sidebar.md +++ b/docs/api/memory/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/cast.md b/docs/api/memory/cast.md index 8be16e58e..075e13e71 100644 --- a/docs/api/memory/cast.md +++ b/docs/api/memory/cast.md @@ -6,19 +6,18 @@
-
- +
+
occa::memory cast(const occa::dtype_t &dtype_)
- Source + Source
-
diff --git a/docs/api/memory/cast/_sidebar.md b/docs/api/memory/cast/_sidebar.md index dfec86d27..175a0d72c 100644 --- a/docs/api/memory/cast/_sidebar.md +++ b/docs/api/memory/cast/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/clone.md b/docs/api/memory/clone.md index f982404a8..aa3b1cc57 100644 --- a/docs/api/memory/clone.md +++ b/docs/api/memory/clone.md @@ -6,19 +6,18 @@
-
- +
+
occa::memory clone()
- Source + Source
-
diff --git a/docs/api/memory/clone/_sidebar.md b/docs/api/memory/clone/_sidebar.md index 5de408297..9fe45d0bf 100644 --- a/docs/api/memory/clone/_sidebar.md +++ b/docs/api/memory/clone/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/constructor.md b/docs/api/memory/constructor.md index a3835ea0d..498949f91 100644 --- a/docs/api/memory/constructor.md +++ b/docs/api/memory/constructor.md @@ -6,19 +6,18 @@
-
- +
+
- memory() + memory()
- Source + Source
-
diff --git a/docs/api/memory/constructor/_sidebar.md b/docs/api/memory/constructor/_sidebar.md index 9612a124f..eec7ba66d 100644 --- a/docs/api/memory/constructor/_sidebar.md +++ b/docs/api/memory/constructor/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/copyFrom.md b/docs/api/memory/copyFrom.md index dfd7b9542..4b1e3e77f 100644 --- a/docs/api/memory/copyFrom.md +++ b/docs/api/memory/copyFrom.md @@ -6,9 +6,9 @@
-
- +
+
void copyFrom(const void *src, @@ -16,12 +16,11 @@ const dim_t offset, const occa::json &props)
- Source + Source
-
diff --git a/docs/api/memory/copyFrom/_sidebar.md b/docs/api/memory/copyFrom/_sidebar.md index 211e8eb16..462b9a159 100644 --- a/docs/api/memory/copyFrom/_sidebar.md +++ b/docs/api/memory/copyFrom/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/copyTo.md b/docs/api/memory/copyTo.md index c2cdb90e7..c7ae8592b 100644 --- a/docs/api/memory/copyTo.md +++ b/docs/api/memory/copyTo.md @@ -6,9 +6,9 @@
-
- +
+
void copyTo(void *dest, @@ -16,12 +16,11 @@ const dim_t offset, const occa::json &props)
- Source + Source
-
diff --git a/docs/api/memory/copyTo/_sidebar.md b/docs/api/memory/copyTo/_sidebar.md index 437660f3a..c34436677 100644 --- a/docs/api/memory/copyTo/_sidebar.md +++ b/docs/api/memory/copyTo/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/free.md b/docs/api/memory/free.md index abe06d40b..0eacf1b01 100644 --- a/docs/api/memory/free.md +++ b/docs/api/memory/free.md @@ -6,19 +6,18 @@
-
- +
+
void free()
- Source + Source
-
diff --git a/docs/api/memory/free/_sidebar.md b/docs/api/memory/free/_sidebar.md index 31484eabe..2a00bd0ac 100644 --- a/docs/api/memory/free/_sidebar.md +++ b/docs/api/memory/free/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/ptr.md b/docs/api/memory/ptr.md index c4fce8928..0128cd2c4 100644 --- a/docs/api/memory/ptr.md +++ b/docs/api/memory/ptr.md @@ -6,19 +6,18 @@
-
- +
+
template <class T> T* ptr()
- Source + Source
-
diff --git a/docs/api/memory/ptr/_sidebar.md b/docs/api/memory/ptr/_sidebar.md index a9ac0853e..9515ee833 100644 --- a/docs/api/memory/ptr/_sidebar.md +++ b/docs/api/memory/ptr/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/memory/slice.md b/docs/api/memory/slice.md index d49225eba..6a94a4093 100644 --- a/docs/api/memory/slice.md +++ b/docs/api/memory/slice.md @@ -6,20 +6,19 @@
-
- +
+
occa::memory slice(const dim_t offset, const dim_t count)
- Source + Source
-
diff --git a/docs/api/memory/slice/_sidebar.md b/docs/api/memory/slice/_sidebar.md index d20d8548d..596c2ff3f 100644 --- a/docs/api/memory/slice/_sidebar.md +++ b/docs/api/memory/slice/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/stream/_sidebar.md b/docs/api/stream/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/stream/_sidebar.md +++ b/docs/api/stream/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/api/streamTag/_sidebar.md b/docs/api/streamTag/_sidebar.md index 10270fcb1..b0fd59e9f 100644 --- a/docs/api/streamTag/_sidebar.md +++ b/docs/api/streamTag/_sidebar.md @@ -10,6 +10,7 @@ - [**API**](/api/) - [occa::json](/api/json/) - [occa::hash_t](/api/hash_t) + - [occa::kernelArg](/api/kernelArg) - [occa::kernel](/api/kernel/) - [occa::device](/api/device/) - [occa::function](/api/function) diff --git a/docs/assets/occa.css b/docs/assets/occa.css index a2d6211ac..e7ad9f701 100644 --- a/docs/assets/occa.css +++ b/docs/assets/occa.css @@ -375,7 +375,7 @@ code .token.annotation { } .api-container .signature { - margin: 30px 0; + margin: 40px 0; } .api-container .section-header { @@ -388,7 +388,7 @@ code .token.annotation { } .api-container .signature .definition-container { - margin: 1em 0; + margin: 2em 0; } .api-container .signature p { @@ -397,7 +397,7 @@ code .token.annotation { .api-container .signature .definition { display: flex; - margin: 0.8em 0 0.4em 0; + margin: 2em 0; } .api-container .signature .definition code { diff --git a/docs/assets/occa.js b/docs/assets/occa.js index c66432be7..819cba83f 100644 --- a/docs/assets/occa.js +++ b/docs/assets/occa.js @@ -261,7 +261,7 @@ occa.addTabs = (content) => ( occa.addMarkdown = (content) => ( occa.applyRegexTransformation( content, - /::: markdown\s+([\s\S]*?)\s+:::(?:\n|$)/g, + /::: markdown\s+([\s\S]*?)\s+?:::/g, ([content]) => { const parts = marked.lexer(content.trim()); return occa.tokensToHTML(parts); diff --git a/include/occa/core/kernel.hpp b/include/occa/core/kernel.hpp index 7e99636b6..d2fc6e4b3 100644 --- a/include/occa/core/kernel.hpp +++ b/include/occa/core/kernel.hpp @@ -120,6 +120,9 @@ namespace occa { * Description: * TODO * + * Argument Override: + * [[kernelArg]]... args + * * @endDoc */ #include "kernelOperators.hpp_codegen" diff --git a/include/occa/core/kernelArg.hpp b/include/occa/core/kernelArg.hpp index 1110fbad8..795139a1d 100644 --- a/include/occa/core/kernelArg.hpp +++ b/include/occa/core/kernelArg.hpp @@ -42,6 +42,14 @@ namespace occa { //==================================== //---[ kernelArg ]-------------------- + /** + * @startDoc{kernelArg} + * + * Description: + * TODO + * + * @endDoc + */ class kernelArg : public generic { public: kernelArgDataVector args; diff --git a/scripts/docs/api_docgen/markdown.py b/scripts/docs/api_docgen/markdown.py index 3834f0eb2..079ab4f04 100644 --- a/scripts/docs/api_docgen/markdown.py +++ b/scripts/docs/api_docgen/markdown.py @@ -32,7 +32,7 @@ def parse_sections(content: str, "Section Header 3": "line1", } ''' - content = content.strip() + content = (content or '').strip() parts = re.split(f'(?:^|\n+)([^\s].*?[^\s]):\n', content) diff --git a/scripts/docs/api_docgen/types.py b/scripts/docs/api_docgen/types.py index 2bfa96708..24b0d2153 100644 --- a/scripts/docs/api_docgen/types.py +++ b/scripts/docs/api_docgen/types.py @@ -147,7 +147,7 @@ def to_string(self, if info: content += f'''{info.name}'''.strip() char_count += len(info.name) - else: + elif self.type_: content += f'{self.type_}' char_count += len(cast(str, self.type_)) @@ -257,36 +257,66 @@ def get_markdown_content(self, description = sections.get('Description') examples = sections.get('Examples') + # Special case when we want to replace the argument type + # + # Example: + # void operator () ([[kernelArg]]... args) + # + argument_override = sections.get('Argument Override') + method_header = markdown.build_header(name, 1, info.link, include_id=False) - function_definitions = '\n
\n'.join( - f''' + content = f''' +{method_header} + +
+''' + + func_descriptions = [ + (override, self.get_description_markdown(override, hyperlink_mapping)) + for override in overrides + ] + + override_group_descriptions = [''] + override_groups = [[]] + for override, func_description in func_descriptions: + if func_description: + override_group_descriptions.append(func_description) + override_groups.append([]) + override_groups[-1].append(override) + + for func_description, override_group in zip(override_group_descriptions, override_groups): + if not len(override_group): + continue + + content += '\n
\n' + for index, override in enumerate(override_group): + is_last = (index == (len(override_group) - 1)) + + func = cast('Function', override.code) + + override_description = func_description if is_last else '' + + content += f'''
- {func.get_function_signature(hyperlink_mapping)} + {func.get_function_signature(hyperlink_mapping, argument_override)}
Source
- {self.get_description_markdown(override, hyperlink_mapping)} + {override_description}
''' - for override in overrides - for func in [cast('Function', override.code)] - ) - - content = f''' -{method_header} - -
-
- - {function_definitions} + content += f'''
''' - for (section_header, section_content) in [('Description', description), ('Examples', examples)]: + for (section_header, section_content) in [ + ('Description', description), + ('Examples', examples), + ]: if section_content: section_header = markdown.build_header(section_header, 2, info.link) content += f''' @@ -298,7 +328,10 @@ def get_markdown_content(self, return content - def get_function_signature(self, hyperlink_mapping: HyperlinkMapping): + def get_function_signature(self, + hyperlink_mapping: HyperlinkMapping, + argument_override: Optional[str]): + from . import markdown # Example: # # template @@ -328,21 +361,32 @@ def get_function_signature(self, hyperlink_mapping: HyperlinkMapping): char_count += return_char_count + 1 # malloc( - name_str = f'{self.name}(' + name_str = f'{self.name}' + if name_str.startswith('operator'): + name_str = re.sub(r'^operator', 'operator ', name_str) + name_str += ' ' + name_str += '(' + content += name_str char_count += len(name_str) - left_padding = ' ' * char_count + if argument_override: + content += ( + markdown.replace_hyperlinks(argument_override, + hyperlink_mapping) + ).strip() + else: + left_padding = ' ' * char_count - # . . . . . . . . const int *arg1, - # const int *arg2 - # const int *arg3 - for index, arg in enumerate(self.arguments): - if index: - content += f',\n{left_padding}' - (arg_content, arg_char_count) = arg.to_string(hyperlink_mapping) - content += arg_content - char_count += arg_char_count + # . . . . . . . . const int *arg1, + # const int *arg2 + # const int *arg3 + for index, arg in enumerate(self.arguments): + if index: + content += f',\n{left_padding}' + (arg_content, arg_char_count) = arg.to_string(hyperlink_mapping) + content += arg_content + char_count += arg_char_count # ) content += ')' @@ -391,9 +435,7 @@ def get_description_markdown(self, if description: content += f'''
- ::: markdown - {description} - ::: + ::: markdown {description} :::
''' @@ -401,9 +443,7 @@ def get_description_markdown(self, argument_content = '\n'.join( f'''
  • - {arg_name}: ::: markdown - {arg_description} - ::: + {arg_name}: ::: markdown {arg_description} :::
  • ''' for (arg_name, arg_description) in argument_descriptions @@ -419,15 +459,12 @@ def get_description_markdown(self, content += f'''
    Returns
      -
    • - ::: markdown - {returns} - ::: -
    • +
    • ::: markdown {returns} :::
    -
    ''' + content += '' + return content @@ -571,7 +608,7 @@ def link_name(self) -> str: if self.children: return f'{self.id_}/' else: - return self.id_; + return self.id_ def get_markdown_content(self, git_hash: str,