The Options class handles the automated determination of dtype from the template argument and the selection of the device.
More...
#include </home/runner/work/iganet/iganet/include/core/options.hpp>
|
| | Options () |
| | Default constructor.
|
| |
| | Options (torch::TensorOptions &&options) |
| | Constructor from torch::TensorOptions.
|
| |
| torch::Device | device () const noexcept |
| | Returns the device property.
|
| |
| Options< real_t > | device (torch::Device device) const noexcept |
| | Returns a new Options object with the device property as given.
|
| |
| int32_t | device_index () const noexcept |
| | Returns the device_index property.
|
| |
| Options< real_t > | device_index (int16_t device_index) const noexcept |
| | Returns a new Options object with the device_index property as given.
|
| |
| template<typename other_t > |
| Options< other_t > | dtype () const noexcept |
| | Returns a new Options object with the dtype property as given.
|
| |
| bool | is_sparse () const noexcept |
| | Returns if the layout is sparse.
|
| |
| torch::Layout | layout () const noexcept |
| | Returns the layout property.
|
| |
| Options< real_t > | layout (torch::Layout layout) const noexcept |
| | Returns a new Options object with the layout property as given.
|
| |
| Options< real_t > | memory_format (torch::MemoryFormat memory_format) const noexcept |
| | Returns a new Options object with the memory_format property as given.
|
| |
| | operator torch::TensorOptions () const |
| | Implicit conversion operator.
|
| |
| bool | pinned_memory () const noexcept |
| | Returns the pinned_memory property.
|
| |
| Options< real_t > | pinned_memory (bool pinned_memory) const noexcept |
| | Returns a new Options object with the pinned_memory property as given.
|
| |
| void | pretty_print (std::ostream &os) const noexcept override |
| | Returns a string representation of the Options object.
|
| |
| bool | requires_grad () const noexcept |
| | Returns the requires_grad property.
|
| |
| Options< real_t > | requires_grad (bool requires_grad) const noexcept |
| | Returns a new Options object with the requires_grad property as given.
|
| |
|
| static torch::Dtype | dtype () noexcept |
| | Returns the dtype property.
|
| |
|
| const torch::TensorOptions | options_ |
| | Tensor options.
|
| |
| at::optional< std::string > | name_ |
| | String storing the full qualified name of the object.
|
| |
|
| virtual | ~FullQualifiedName ()=default |
| |
| virtual const std::string & | name () const noexcept |
| | Returns the full qualified name of the object.
|
| |
template<typename real_t>
requires DType<real_t>
class iganet::Options< real_t >
The Options class handles the automated determination of dtype from the template argument and the selection of the device.
- Template Parameters
-
| real_t | Type of real-valued data |
◆ value_type
template<typename real_t >
◆ Options() [1/2]
template<typename real_t >
◆ Options() [2/2]
template<typename real_t >
| iganet::Options< real_t >::Options |
( |
torch::TensorOptions< real_t > && |
options | ) |
|
|
inlineexplicit |
Constructor from torch::TensorOptions.
◆ device() [1/2]
template<typename real_t >
Returns the device property.
◆ device() [2/2]
template<typename real_t >
Returns a new Options object with the device property as given.
◆ device_index() [1/2]
template<typename real_t >
Returns the device_index property.
◆ device_index() [2/2]
template<typename real_t >
Returns a new Options object with the device_index property as given.
◆ dtype() [1/2]
template<typename real_t >
template<typename other_t >
Returns a new Options object with the dtype property as given.
◆ dtype() [2/2]
template<typename real_t >
Returns the dtype property.
◆ is_sparse()
template<typename real_t >
Returns if the layout is sparse.
◆ layout() [1/2]
template<typename real_t >
Returns the layout property.
◆ layout() [2/2]
template<typename real_t >
Returns a new Options object with the layout property as given.
◆ memory_format()
template<typename real_t >
Returns a new Options object with the memory_format property as given.
◆ operator torch::TensorOptions()
template<typename real_t >
Implicit conversion operator.
- Note
- Do not mark this operator 'explicit' as this will prevent that objects of type Options are implicitly converted into objects of type torch::TensorOptions
◆ pinned_memory() [1/2]
template<typename real_t >
Returns the pinned_memory property.
◆ pinned_memory() [2/2]
template<typename real_t >
Returns a new Options object with the pinned_memory property as given.
◆ pretty_print()
template<typename real_t >
|
|
inlineoverridevirtualnoexcept |
◆ requires_grad() [1/2]
template<typename real_t >
Returns the requires_grad property.
◆ requires_grad() [2/2]
template<typename real_t >
Returns a new Options object with the requires_grad property as given.
◆ options_
template<typename real_t >
The documentation for this class was generated from the following file: