DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::IScheduling_configuration Class Referenceabstract

This interface is used to query and change the scheduling configuration. More...

#include <ischeduling_configuration.h>

Inheritance diagram for mi::neuraylib::IScheduling_configuration:

Public Member Functions

virtual Sint32 set_cpu_load_limit (Float32 limit)=0
 Sets the CPU load limit. More...
 
virtual Float32 get_cpu_load_limit () const =0
 Returns the CPU load limit. More...
 
virtual Sint32 set_gpu_load_limit (Float32 limit)=0
 Sets the GPU load limit. More...
 
virtual Float32 get_gpu_load_limit () const =0
 Returns the GPU load limit. More...
 
virtual Sint32 set_accept_delegations (bool value)=0
 Sets if the host accepts delegations from other hosts. More...
 
virtual bool get_accept_delegations () const =0
 Returns if delegations of work are currently accepted from other hosts. More...
 
virtual Sint32 set_work_delegation_enabled (bool value)=0
 Sets if the host will currently delegate work to other hosts. More...
 
virtual bool get_work_delegation_enabled () const =0
 Returns if work is currently delegated to other hosts. More...
 
virtual Sint32 set_gpu_work_delegation_enabled (bool value)=0
 Sets if the host will currently delegate GPU work to other hosts. More...
 
virtual bool get_gpu_work_delegation_enabled () const =0
 Returns if GPU work is currently delegated to other hosts. More...
 
virtual Sint32 set_thread_affinity_enabled (bool value)=0
 Sets the CPU affinity for threads. More...
 
virtual bool get_thread_affinity_enabled () const =0
 Returns the CPU affinity for threads. 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 IInterfaceget_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 IInterfaceget_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< 0x4f1fe336, ... >
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< 0x4f1fe336, ... >
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...
 

Detailed Description

This interface is used to query and change the scheduling configuration.

Member Function Documentation

 get_accept_delegations()

virtual bool mi::neuraylib::IScheduling_configuration::get_accept_delegations ( ) const
pure virtual

Returns if delegations of work are currently accepted from other hosts.

See also
set_accept_delegations()
Returns
The currently configured value.

 get_cpu_load_limit()

virtual Float32 mi::neuraylib::IScheduling_configuration::get_cpu_load_limit ( ) const
pure virtual

Returns the CPU load limit.

See also
set_cpu_load_limit()

 get_gpu_load_limit()

virtual Float32 mi::neuraylib::IScheduling_configuration::get_gpu_load_limit ( ) const
pure virtual

Returns the GPU load limit.

See also
set_gpu_load_limit()

 get_gpu_work_delegation_enabled()

virtual bool mi::neuraylib::IScheduling_configuration::get_gpu_work_delegation_enabled ( ) const
pure virtual

Returns if GPU work is currently delegated to other hosts.

Note that this reflects the configured value but is not affected by disabling work delegation completely.

See also
set_gpu_work_delegation_enabled(), set_work_delegation_enabled(), get_work_delegation_enabled()
Returns
The currently configured value.

 get_thread_affinity_enabled()

virtual bool mi::neuraylib::IScheduling_configuration::get_thread_affinity_enabled ( ) const
pure virtual

Returns the CPU affinity for threads.

See also
set_thread_affinity_enabled()

 get_work_delegation_enabled()

virtual bool mi::neuraylib::IScheduling_configuration::get_work_delegation_enabled ( ) const
pure virtual

Returns if work is currently delegated to other hosts.

See also
set_work_delegation_enabled()
Returns
The currently configured value.

 set_accept_delegations()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_accept_delegations ( bool  value)
pure virtual

Sets if the host accepts delegations from other hosts.

This can be called at any time by any thread. Enforcing the limitation may take a short amount of time, though, because current delegations will still be handled.

See also
get_accept_delegations()
Parameters
valuetrue if delegations are accepted, false otherwise.
Returns
0, in case of success, -1 in case of failure.

 set_cpu_load_limit()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_cpu_load_limit ( Float32  limit)
pure virtual

Sets the CPU load limit.

The CPU load is the sum of the CPU loads caused by all currently active threads. A single thread fully using a single CPU core is said to cause a CPU load of 1.0. The CPU load limit defaults to the number of CPU cores.

Note
If the limit is reduced, it might take some time until the current CPU load obeys the limit.
See also
get_cpu_load_limit()
Parameters
limitThe new CPU load limit. The value might be clamped against some upper bound imposed by license restrictions.
Returns
  • 0: Success
  • -1: Invalid new limit (less than 1.0).

 set_gpu_load_limit()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_gpu_load_limit ( Float32  limit)
pure virtual

Sets the GPU load limit.

The GPU load is the sum of the GPU loads caused by all currently active threads. A single thread fully using a single GPU is said to cause a GPU load of 1.0. The GPU load limit defaults to the number of GPUs.

Note
If the limit is reduced, it might take some time until the current GPU load obeys the limit.
See also
get_gpu_load_limit()
Parameters
limitThe new GPU load limit. The value might be clamped against some upper bound imposed by license restrictions.
Returns
  • 0: Success
  • -1: Invalid new limit (less than 1.0).

 set_gpu_work_delegation_enabled()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_gpu_work_delegation_enabled ( bool  value)
pure virtual

Sets if the host will currently delegate GPU work to other hosts.

This can be called at any time by any thread. Enforcing the limitation may take a short amount of time, though, because current delegations will still be handled.

Note that if the system does not delegate work at all this is also applied to GPU work. Thus, even if this is set to true, no GPU work will be delegated if work delegation as a whole is disabled.

See also
get_gpu_work_delegation_enabled(), set_work_delegation_enabled(), get_work_delegation_enabled()
Parameters
valuetrue if work is delegated, false otherwise.
Returns
0, in case of success, -1 in case of failure.

 set_thread_affinity_enabled()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_thread_affinity_enabled ( bool  value)
pure virtual

Sets the CPU affinity for threads.

If thread affinity is enabled for a thread then this thread is bound to the CPU it is currently running on. If thread affinity is disabled (the default) the operating system is free to migrate the thread between CPUs as it sees fit (which might suffer from cache misses).

This thread affinity setting only affects internal threads that are used to execute jobs. Application threads are not affected by this setting.

Note that changing this value does not affect a job that is currently being executed, it only affects subsequently started jobs (or fragments thereof).

This method can only be used while DiCE is running.

Parameters
value
Returns
  • 0: Success.
  • -1: Setting the thread affinity is not supported for this (Linux with glibc older than 2.6 and MacOS X).
  • -2: The method cannot be called at this point of time.

 set_work_delegation_enabled()

virtual Sint32 mi::neuraylib::IScheduling_configuration::set_work_delegation_enabled ( bool  value)
pure virtual

Sets if the host will currently delegate work to other hosts.

This can be called at any time by any thread. Enforcing the limitation may take a short amount of time, though, because current delegations will still be handled.

See also
get_work_delegation_enabled()
Parameters
valuetrue if work is delegated, false otherwise.
Returns
0, in case of success, -1 in case of failure.