Result of a fallible GPU operation: exactly one of a value of type T or a GpuError.
More...
#include "donner/gpu/GpuResult.h"
|
| | Result (T &&result) |
| | Construct from a successful result.
|
| | Result (const T &result) |
| | Construct from a successful result by copy.
|
| | Result (GpuError &&error) |
| | Construct from an error.
|
| | Result (const GpuError &error) |
| | Construct from an error by copy.
|
| T & | result () & |
| | Returns the contained result.
|
| T && | result () && |
| | Returns the contained result (move).
|
| const T & | result () const & |
| | Returns the contained result.
|
| GpuError & | error () & |
| | Returns the contained error.
|
| GpuError && | error () && |
| | Returns the contained error (move).
|
| const GpuError & | error () const & |
| | Returns the contained error.
|
|
bool | hasResult () const noexcept |
| | Returns true if this Result contains a value.
|
|
bool | hasError () const noexcept |
| | Returns true if this Result contains an error.
|
template<typename T>
class donner::gpu::Result< T >
Result of a fallible GPU operation: exactly one of a value of type T or a GpuError.
The GPU runtime uses no exceptions; this is the only failure channel. The accessor shape (hasResult / result / error) mirrors donner::ParseResult so call sites read the same across the codebase, but unlike ParseResult a GPU operation never returns a partial result together with an error.
- Template Parameters
-
◆ Result() [1/4]
Construct from a successful result.
- Parameters
-
◆ Result() [2/4]
Construct from a successful result by copy.
- Parameters
-
◆ Result() [3/4]
Construct from an error.
- Parameters
-
◆ Result() [4/4]
Construct from an error by copy.
- Parameters
-
◆ error() [1/3]
Returns the contained error.
- Precondition
- There is a valid error, i.e. hasError() returns true.
◆ error() [2/3]
Returns the contained error (move).
- Precondition
- There is a valid error, i.e. hasError() returns true.
◆ error() [3/3]
Returns the contained error.
- Precondition
- There is a valid error, i.e. hasError() returns true.
◆ result() [1/3]
Returns the contained result.
- Precondition
- There is a valid result, i.e. hasResult() returns true.
◆ result() [2/3]
Returns the contained result (move).
- Precondition
- There is a valid result, i.e. hasResult() returns true.
◆ result() [3/3]
Returns the contained result.
- Precondition
- There is a valid result, i.e. hasResult() returns true.
The documentation for this class was generated from the following file: