This interface allows configuration of DiCE. More...
#include <dice.h>
Public Member Functions | |
virtual bool | register_serializable_class (base::Uuid class_id, IUser_class_factory *factory)=0 |
Registers a serializable class with DiCE. More... | |
template<class T> | |
bool | register_serializable_class () |
Registers a serializable class with DiCE. More... | |
virtual bool | unregister_serializable_class (base::Uuid class_id)=0 |
Unregisters a serializable class with DiCE. More... | |
template<class T> | |
bool | unregister_serializable_class () |
Unregisters a serializable class with DiCE. More... | |
virtual Sint32 | set_gpu_enabled (bool value)=0 |
Enables or disables GPU detection. More... | |
virtual bool | get_gpu_enabled () const =0 |
Returns if GPU detection is enabled. More... | |
virtual IRDMA_context * | get_rdma_context (Uint32 host_id)=0 |
Returns the RDMA context to be used for generating RDMA buffers. More... | |
virtual Uint32 | get_highest_gpu_id (Uint32 host_id=0)=0 |
Returns the highest GPU ID. More... | |
virtual const IGpu_description * | get_gpu_description (Uint32 gpu_id, Uint32 host_id=0)=0 |
Returns the description of a GPU with a given ID. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xfccbf7b8, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xfccbf7b8, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
This interface allows configuration of DiCE.
For instance, the user-define database elements and jobs can be registered for serialization so that hosts in the cluster can set up the distributed database.
|
pure virtual |
Returns the description of a GPU with a given ID.
gpu_id | The GPU ID. Note that the lowest GPU ID is 1, not 0. The highest ID can be obtained from get_highest_gpu_id(). Note that GPU IDs do not need to be consecutive. |
host_id | An optional host ID. If larger than 0, the returned GPU description refers to a GPU installed on the machine with the given host ID, and to the local host otherwise. See mi::neuraylib::INetwork_configuration::register_host_callback() for details about host IDs of other machines in the cluster. |
NULL
if gpu_id
is not a valid GPU ID for the host host_id
.
|
pure virtual |
Returns if GPU detection is enabled.
|
pure virtual |
Returns the highest GPU ID.
host_id | An optional host ID. If larger than 0, the returned GPU description refers to a GPU installed on the machine with the given host ID, and to the local host otherwise. |
|
pure virtual |
Returns the RDMA context to be used for generating RDMA buffers.
host_id | The id of the host for which to acquire the context |
|
inline |
Registers a serializable class with DiCE.
Registering a class for serialization allows communicating class instances through the serialization mechanism. It enables, for instance, storing database elements and jobs in the distributed database or communicating job results (see mi::neuraylib::IFragmented_job::execute_fragment_remote()).
Registering a class for serialization can only be done before DiCE has been started.
This templated member function is a wrapper of the non-template variant for the user's convenience. It uses the default class factory mi::neuraylib::User_class_factory specialized for T.
true
if the class of type T was successfully registered for serialization, and false
otherwise.
|
pure virtual |
Registers a serializable class with DiCE.
Registering a class for serialization allows communicating class instances through the serialization mechanism. It enables, for instance, storing database elements and jobs in the distributed database or communicating job results (see mi::neuraylib::IFragmented_job::execute_fragment_remote()).
Registering a class for serialization can only be done before DiCE has been started.
class_id | The class ID of the class that shall be registered for serialization. |
factory | The class factory. |
true
if the class of was successfully registered for serialization, and false
otherwise.
|
pure virtual |
Enables or disables GPU detection.
By default, GPU detection is enabled. GPU detection can be disabled in case it causes problems (hangs, crashes) or GPU usage is not desired at all.
This can only be configured before DiCE has been started.
value | true if GPUs are to be detected, false otherwise. |
|
inline |
Unregisters a serializable class with DiCE.
Unregistering a class for serialization can only be done after DiCE has been shut down.
This templated member function is a wrapper of the non-template variant for the user's convenience.
true
if the class of type T was successfully unregistered for serialization, and false
otherwise.
|
pure virtual |
Unregisters a serializable class with DiCE.
Unregistering a class for serialization can only be done after DiCE has been shut down.
class_id | The class ID of the class that shall be unregistered for serialization. |
true
if the class of was successfully unregistered for serialization, and false
otherwise.