Skip to content

Commit

Permalink
[Docs] Finish API documentation (libocca#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmed256 authored Jan 30, 2021
1 parent 628fed0 commit df26132
Show file tree
Hide file tree
Showing 273 changed files with 6,458 additions and 997 deletions.
2 changes: 0 additions & 2 deletions docs/api/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# API

?> API documentation is still under development

Welcome to the OCCA library API documentation!


Expand Down
14 changes: 7 additions & 7 deletions docs/api/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</div>

- [**API**](/api/)
- [occa::device](/api/device/)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [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::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
2 changes: 1 addition & 1 deletion docs/api/device/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ JSON formatted strings can also be passed directly, which can be useful when loa
```cpp
occa::device device(
"{ mode: 'CUDA", device_id: 0 }"
"{ mode: 'CUDA', device_id: 0 }"
);
```

Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
Expand All @@ -36,8 +32,12 @@
- [timeBetween](/api/device/timeBetween)
- [waitFor](/api/device/waitFor)
- [wrapMemory](/api/device/wrapMemory)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
15 changes: 10 additions & 5 deletions docs/api/device/buildKernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@

<div class="definition-container">
<div class="definition">
<code><a href="#/api/kernel/">occa::kernel</a> buildKernel(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &filename,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &props)</code>
<code class="desktop-only"><a href="#/api/kernel/">occa::kernel</a> buildKernel(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;filename,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props)</code>
<code class="mobile-only"><a href="#/api/kernel/">occa::kernel</a> buildKernel(
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;filename,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props
)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L511" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L513" target="_blank">Source</a>
</div>
<div class="description">

Expand Down Expand Up @@ -104,7 +109,7 @@ props["headers"] += "#define TWO 2";
</a>
</h3>

Lastly, [occa::function](/api/function)'s can be captured through the `functions` path.
Lastly, [occa::function](/api/function/)'s can be captured through the `functions` path.
For example:

```cpp
Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/buildKernel/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [createStream](/api/device/createStream)
- [dontUseRefs](/api/device/dontUseRefs)
Expand Down
13 changes: 9 additions & 4 deletions docs/api/device/buildKernelFromString.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@

<div class="definition-container">
<div class="definition">
<code><a href="#/api/kernel/">occa::kernel</a> buildKernelFromString(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &content,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &props)</code>
<code class="desktop-only"><a href="#/api/kernel/">occa::kernel</a> buildKernelFromString(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;content,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props)</code>
<code class="mobile-only"><a href="#/api/kernel/">occa::kernel</a> buildKernelFromString(
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;content,
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;kernelName,
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props
)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L535" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L537" target="_blank">Source</a>
</div>
<div class="description">

Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/buildKernelFromString/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [createStream](/api/device/createStream)
- [dontUseRefs](/api/device/dontUseRefs)
- [finish](/api/device/finish)
Expand Down
21 changes: 15 additions & 6 deletions docs/api/device/constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

<div class="definition-container">
<div class="definition">
<code>device()</code>
<code class="desktop-only">device()</code>
<code class="mobile-only">device(

)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L130" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L130" target="_blank">Source</a>
</div>
<div class="description">

Expand All @@ -27,9 +30,12 @@

<div class="definition-container">
<div class="definition">
<code>device(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &props)</code>
<code class="desktop-only">device(<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;props)</code>
<code class="mobile-only">device(
<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;props
)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L144" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L144" target="_blank">Source</a>
</div>
<div class="description">

Expand All @@ -52,9 +58,12 @@

<div class="definition-container">
<div class="definition">
<code>device(<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &props)</code>
<code class="desktop-only">device(<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props)</code>
<code class="mobile-only">device(
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props
)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L158" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L158" target="_blank">Source</a>
</div>
<div class="description">

Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/constructor/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
</div>

- [**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)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [buildKernel](/api/device/buildKernel)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [createStream](/api/device/createStream)
Expand Down
11 changes: 7 additions & 4 deletions docs/api/device/createStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@

<div class="definition-container">
<div class="definition">
<code><a href="#/api/stream">occa::stream</a> createStream(<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &props)</code>
<code class="desktop-only"><a href="#/api/stream/">occa::stream</a> createStream(<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props)</code>
<code class="mobile-only"><a href="#/api/stream/">occa::stream</a> createStream(
<span class="token keyword">const</span> <a href="#/api/json/">occa::json</a> &amp;props
)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L375" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L377" target="_blank">Source</a>
</div>
<div class="description">

<div class="section-header">Returns</div>
<ul class="section-list">
<li> ::: markdown Newly created [occa::stream](/api/stream) ::: </li>
<li> ::: markdown Newly created [occa::stream](/api/stream/) ::: </li>
</ul>
</div>
</div>
Expand All @@ -34,7 +37,7 @@
</a>
</h2>

Creates and returns a new [occa::stream](/api/stream) to queue operations on.
Creates and returns a new [occa::stream](/api/stream/) to queue operations on.
If the backend supports streams, out-of-order work can be achieved through
the use of streams.

Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/createStream/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [createStream](/api/device/createStream)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [dontUseRefs](/api/device/dontUseRefs)
- [finish](/api/device/finish)
- [free](/api/device/free)
Expand Down
7 changes: 5 additions & 2 deletions docs/api/device/dontUseRefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

<div class="definition-container">
<div class="definition">
<code><span class="token keyword">void</span> dontUseRefs()</code>
<code class="desktop-only"><span class="token keyword">void</span> dontUseRefs()</code>
<code class="mobile-only"><span class="token keyword">void</span> dontUseRefs(

)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L185" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L185" target="_blank">Source</a>
</div>

</div>
Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/dontUseRefs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [createStream](/api/device/createStream)
- [dontUseRefs](/api/device/dontUseRefs)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [finish](/api/device/finish)
- [free](/api/device/free)
- [getStream](/api/device/getStream)
Expand Down
7 changes: 5 additions & 2 deletions docs/api/device/finish.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

<div class="definition-container">
<div class="definition">
<code><span class="token keyword">void</span> finish()</code>
<code class="desktop-only"><span class="token keyword">void</span> finish()</code>
<code class="mobile-only"><span class="token keyword">void</span> finish(

)</code>
<div class="flex-spacing"></div>
<a href="https://github.com/libocca/occa/blob/7d325d3f/include/occa/core/device.hpp#L341" target="_blank">Source</a>
<a href="https://github.com/libocca/occa/blob/6d155d0c/include/occa/core/device.hpp#L343" target="_blank">Source</a>
</div>

</div>
Expand Down
16 changes: 8 additions & 8 deletions docs/api/device/finish/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
</div>

- [**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)
- [buildKernel](/api/device/buildKernel)
- [buildKernelFromString](/api/device/buildKernelFromString)
- [createStream](/api/device/createStream)
- [dontUseRefs](/api/device/dontUseRefs)
- [finish](/api/device/finish)
- [occa::function](/api/function)
- [occa::stream](/api/stream)
- [occa::dtype_t](/api/dtype_t)
- [occa::dtype_t](/api/dtype_t/)
- [occa::function](/api/function/)
- [occa::hash_t](/api/hash_t/)
- [occa::json](/api/json/)
- [occa::kernel](/api/kernel/)
- [occa::kernelArg](/api/kernelArg)
- [occa::memory](/api/memory/)
- [occa::streamTag](/api/streamTag)
- [occa::stream](/api/stream/)
- [occa::streamTag](/api/streamTag/)
- [free](/api/device/free)
- [getStream](/api/device/getStream)
- [hasSeparateMemorySpace](/api/device/hasSeparateMemorySpace)
Expand Down
Loading

0 comments on commit df26132

Please sign in to comment.