Katana Plug-in APIs 0.1
Public Types | Public Member Functions

Foundry::Katana::GeolibSetupInterface Class Reference

Provides functions to allow an Op to configure how it's scheduled and evaluated by the Runtime. More...

#include <FnGeolibSetupInterface.h>

List of all members.

Public Types

enum  ThreadMode { ThreadModeConcurrent = kFnKatGeolibThreadModeConcurrent, ThreadModeGlobalUnsafe = kFnKatGeolibThreadModeGlobalUnsafe }
 

By default an Op can potentially be evaluated by the Runtime in multiple threads concurrently. The ThreadMode enumeration provides a means to specify to the Runtime the concurrency requirements of an Op.

More...

Public Member Functions

void setThreading (ThreadMode threadmode)
 Sets the concurrency constraints the Runtime must adhere to when evaluating this Op.
void setOpsCollapsible (const FnAttribute::StringAttribute &collapsedOpArgsGroupName)
 Allows Geolib3 to collapse Ops of this type and make a single cook() call passing the accumulated Op Args as a group under the name specified by collapsedOpArgsGroupName.

Detailed Description

Provides functions to allow an Op to configure how it's scheduled and evaluated by the Runtime.


Member Enumeration Documentation

By default an Op can potentially be evaluated by the Runtime in multiple threads concurrently. The ThreadMode enumeration provides a means to specify to the Runtime the concurrency requirements of an Op.

Enumerator:
ThreadModeConcurrent 

The Op can be evaluated concurrently with any other Op in the Op tree, In addition, the same op type can be evaluated by more than one thread concurrently. Ops which declare themselves ThreadModeConcurrent may be run at anytime, even during GlobalUnsafe execution.

Considerations for marking an Op as ThreadModeConcurrent :

  • Does the Op contain global static data? If yes, is it properly guarded against race conditions?
  • Does the Op make use of third-party libraries and are these libraries thread-safe?
  • Does the Op pass or share the same private data instances amongst its children? If so, is that data structure also appropriately guarded for concurrent access and is its means of destruction thread-safe?
ThreadModeGlobalUnsafe 

The Op will run in a single thread, only one GlobalUnsafe Op will be scheduled to run within the entire process at any one time even across multiple Runtime instantiations.

Use this if the Op makes calls to unknown code, unknown libraries, or code known to be thread-unsafe.

Note:
GlobalUnsafe Ops do not prevent the concurrent execution of those explicitly white-listed as Concurrent.

Member Function Documentation

void Foundry::Katana::GeolibSetupInterface::setOpsCollapsible ( const FnAttribute::StringAttribute collapsedOpArgsGroupName)

Allows Geolib3 to collapse Ops of this type and make a single cook() call passing the accumulated Op Args as a group under the name specified by collapsedOpArgsGroupName.

Parameters:
collapsedOpArgsGroupNameThe name of the attribute under which the batch will be stored.
void Foundry::Katana::GeolibSetupInterface::setThreading ( ThreadMode  threadmode)

Sets the concurrency constraints the Runtime must adhere to when evaluating this Op.

Parameters:
threadmodeThe thread mode (see ThreadMode) appropriate for this Op.
See also:
ThreadMode

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator