![]() |
IgANet
IgANets - Isogeometric Analysis Networks
|
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/options.hpp>
Public Types | |
using | value_type = real_t |
Data type. | |
Public Member Functions | |
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. | |
torch::Dtype | dtype () const noexcept |
Returns the dtype property. | |
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. | |
virtual void | pretty_print (std::ostream &os=Log(log::info)) 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. | |
Private Attributes | |
const torch::TensorOptions | options_ |
Tensor options. | |
![]() | |
at::optional< std::string > | name_ |
String storing the full qualified name of the object. | |
Additional Inherited Members | |
![]() | |
virtual const std::string & | name () const noexcept |
Returns the full qualified name of the object. | |
The Options class handles the automated determination of dtype from the template argument and the selection of the device.
real_t | Type of real-valued data |
using iganet::Options< real_t >::value_type = real_t |
Data type.
|
inline |
Default constructor.
|
inlineexplicit |
Constructor from torch::TensorOptions.
|
inlinenoexcept |
Returns the device
property.
|
inlinenoexcept |
Returns a new Options object with the device
property as given.
|
inlinenoexcept |
Returns the device_index
property.
|
inlinenoexcept |
Returns a new Options object with the device_index
property as given.
|
inlinenoexcept |
Returns the dtype
property.
|
inlinenoexcept |
Returns a new Options object with the dtype
property as given.
|
inlinenoexcept |
Returns if the layout is sparse.
|
inlinenoexcept |
Returns the layout
property.
|
inlinenoexcept |
Returns a new Options object with the layout
property as given.
|
inlinenoexcept |
Returns a new Options object with the memory_format
property as given.
|
inline |
Implicit conversion operator.
|
inlinenoexcept |
Returns the pinned_memory
property.
|
inlinenoexcept |
Returns a new Options object with the pinned_memory
property as given.
|
inlineoverridevirtualnoexcept |
Returns a string representation of the Options object.
Implements iganet::utils::FullQualifiedName.
|
inlinenoexcept |
Returns the requires_grad
property.
|
inlinenoexcept |
Returns a new Options object with the requires_grad
property as given.
|
private |
Tensor options.