mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Allow runtime construction of DeviceAdapterId
When need some way to convert user input such as an integer or string to a device adapter id. This allows for integer to device adapter id.
This commit is contained in:
parent
5a25131aa1
commit
a512cd495e
@ -63,6 +63,8 @@ struct DeviceAdapterId
|
||||
DeviceAdapterNameType GetName() const;
|
||||
|
||||
protected:
|
||||
friend DeviceAdapterId make_DeviceAdapterId(vtkm::Int8 id);
|
||||
|
||||
constexpr explicit DeviceAdapterId(vtkm::Int8 id)
|
||||
: Value(id)
|
||||
{
|
||||
@ -72,6 +74,11 @@ private:
|
||||
vtkm::Int8 Value;
|
||||
};
|
||||
|
||||
DeviceAdapterId make_DeviceAdapterId(vtkm::Int8 id)
|
||||
{
|
||||
return DeviceAdapterId(id);
|
||||
}
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
struct DeviceAdapterTraits;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user