https://github.com/shader-slang/slang
Tip revision: efeda20ec280771348887ae4eb498a8b158c9c0c authored by Yong He on 30 March 2023, 21:34:54 UTC
Fix stdlib definitions for tensor interlocked methods. (#2761)
Fix stdlib definitions for tensor interlocked methods. (#2761)
Tip revision: efeda20
doc.slang.expected
result code = 0
standard error = {
--------------------------------------------------------------------------------
# `outFunc`
## Signature
```
void outFunc(out int v);
```
## Parameters
* `v`
--------------------------------------------------------------------------------
# `struct ParentStruct<T>`
## Description
Testing out nested generics
## Generic Parameters
* `T` Some type
--------------------------------------------------------------------------------
# `struct ParentStruct<T>.ChildStruct<S>`
## Description
Testing out a child
## Generic Parameters
* `S` Some other type
## Methods
* `getValue`
--------------------------------------------------------------------------------
# `ParentStruct<T>.ChildStruct<S>.getValue`
## Description
A useless method hey ho
## Signature
```
ParentStruct.T ParentStruct<T>.ChildStruct<S>.getValue(ParentStruct<ParentStruct.T>.ChildStruct.S v);
```
## Parameters
* `v`
--------------------------------------------------------------------------------
# `struct GenericStruct<T>`
## Generic Parameters
* `T`
## Fields
* `value`
## Methods
* `getValue`
--------------------------------------------------------------------------------
# `GenericStruct<T>.getValue`
## Signature
```
GenericStruct.T GenericStruct<T>.getValue();
```
--------------------------------------------------------------------------------
# `addInts`
## Description
A rather silly generic function to test out doc extraction
## Signature
```
T addInts<T, U:int, V:int>(
T z,
T b);
```
## Parameters
* `T` The type we are operating on
* `U` Just testing out a non type based generic
* `V` And another one
* `z` CHECKING!!
* `b` The B parameter
--------------------------------------------------------------------------------
# `Hey::doAnotherThing`
## Signature
```
void Hey::doAnotherThing(int a);
```
## Parameters
* `a`
--------------------------------------------------------------------------------
# inputBuffer
```
RWStructuredBuffer<int> inputBuffer
```
## Description
Let's test indent
```
{
imIndented();
}
```
--------------------------------------------------------------------------------
# `interface IDoThing`
## Description
An interface to do things
# Associated types
* _V_ An associated type
## Methods
* `add`
* `sub`
--------------------------------------------------------------------------------
# `IDoThing.add`
## Description
Add two integers
## Signature
```
IDoThing.V IDoThing.add(
IDoThing.V a,
IDoThing.V b);
```
## Parameters
* `a` First parameter
* `b` Second parameter
--------------------------------------------------------------------------------
# `IDoThing.sub`
## Description
Subtract
Multi-line
## Signature
```
int IDoThing.sub(
int a,
int b);
```
## Parameters
* `a` First
* `b` Second
--------------------------------------------------------------------------------
# `interface IThing`
## Methods
* `getValue`
--------------------------------------------------------------------------------
# `IThing.getValue`
## Signature
```
float IThing.getValue();
```
--------------------------------------------------------------------------------
# `extension float : IThing`
*Implements:* `IThing`
## Description
Implement IThing on float
## Methods
* `getValue`
--------------------------------------------------------------------------------
# `float.getValue`
## Description
Just return the float itself!
## Signature
```
float float.getValue();
```
--------------------------------------------------------------------------------
# `struct Thing`
*Implements:* `IThing`, `IDoThing`
## Methods
* `add`
* `sub`
* `getValue`
--------------------------------------------------------------------------------
# `Thing.add`
## Signature
```
int Thing.add(
int a,
int b);
```
## Parameters
* `a`
* `b`
--------------------------------------------------------------------------------
# `Thing.sub`
## Signature
```
int Thing.sub(
int a,
int b);
```
## Parameters
* `a`
* `b`
--------------------------------------------------------------------------------
# `Thing.getValue`
## Signature
```
float Thing.getValue();
```
--------------------------------------------------------------------------------
# `struct SomeStruct`
## Description
A struct with some fields
## Fields
* `aField` A field
* `anotherField` Multi-line is a thing
* `yetAnother` A field with stuff
## Methods
* `getMethod`
--------------------------------------------------------------------------------
# `SomeStruct.getMethod`
## Description
Get a value
## Signature
```
int SomeStruct.getMethod();
```
--------------------------------------------------------------------------------
# enum AnEnum
## Values
* _Value_ A value
* _AnotherValue_ Another value With a multi-line comment
## Description
An enum
--------------------------------------------------------------------------------
# outputBuffer
```
RWStructuredBuffer<int> outputBuffer
```
## Description
An output buffer
--------------------------------------------------------------------------------
# `doThing`
## Description
doThing!
## Signature
```
int doThing(
int a,
int b);
```
## Parameters
* `a` a parameter
* `b` b parameter
--------------------------------------------------------------------------------
# `computeMain`
## Signature
```
void computeMain(vector<uint,3> dispatchThreadID);
```
## Parameters
* `dispatchThreadID`
}
standard output = {
}