SoOpenCLContext Class |
OpenCL device context API.
Namespace: OIV.Inventor.Devices
The SoOpenCLContext type exposes the following members.
Name | Description | |
---|---|---|
![]() | SoOpenCLContext | Regular constructor. |
Name | Description | |
---|---|---|
![]() | Bind | Bind this context to the current thread. |
![]() | Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetCurrent | Returns the currently bound context (if any) for the current thread. |
![]() | GetDevice | Return attached device. |
![]() | GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) |
![]() | GetSharedGroup | Returns the current shared group. |
![]() | GetSharedId | Returns an id common to all compatible/shared contexts. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IsCompatible | Returns true if two contexts are compatible. |
![]() | IsCurrent | Returns true if the context is valid and currently active. |
![]() | IsSharable | Returns the sharable status of this context. |
![]() | IsSharedWith | Returns the current sharing state with passed context. |
![]() | SetSharable | Sets the sharable property. |
![]() | SetSharedGroup | Explicitly change the sharedGroup. |
![]() | SetSharedWith | Share this context. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Unbind | Unbind this context from the current thread. |
Name | Description | |
---|---|---|
![]() | IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) |
This class provides functions to manage OpenCL contexts. Each context defines a private working area for the threads which use it.
Before using any OpenCL contexts the application must initialize the Open Inventor OpenCL module by calling SoCuda.init().
A valid OpenCL context is required to use OpenCL buffer objects, to call OpenCL functions or to execute OpenCL algorithms (e.g. SoOpenCLConvolution).
The context can only be current for one thread at a time. If thread1 binds a context, then any other thread that tries to bind the context will block until thread1 unbinds the context.