PrSDKGPUDeviceSuite

Struct PrSDKGPUDeviceSuite 

Source
#[repr(C, packed(1))]
pub struct PrSDKGPUDeviceSuite {
Show 14 fields pub GetDeviceCount: Option<unsafe extern "C" fn(outDeviceCount: *mut csSDK_uint32) -> prSuiteError>, pub GetDeviceInfo: Option<unsafe extern "C" fn(inSuiteVersion: csSDK_uint32, inDeviceIndex: csSDK_uint32, outDeviceInfo: *mut PrGPUDeviceInfo) -> prSuiteError>, pub AcquireExclusiveDeviceAccess: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32) -> prSuiteError>, pub ReleaseExclusiveDeviceAccess: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32) -> prSuiteError>, pub AllocateDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inSizeInBytes: usize, outMemory: *mut *mut c_void) -> prSuiteError>, pub FreeDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inMemory: *mut c_void) -> prSuiteError>, pub PurgeDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inRequestedBytesToPurge: usize, outBytesPurged: *mut usize) -> prSuiteError>, pub AllocateHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inSizeInBytes: usize, outMemory: *mut *mut c_void) -> prSuiteError>, pub FreeHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inMemory: *mut c_void) -> prSuiteError>, pub PurgeHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inRequestedBytesToPurge: usize, outBytesPurged: *mut usize) -> prSuiteError>, pub CreateGPUPPix: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inPixelFormat: PrPixelFormat, inWidth: c_int, inHeight: c_int, inPARNumerator: c_int, inPARDenominator: c_int, inFieldType: prFieldType, outPPixHand: *mut PPixHand) -> prSuiteError>, pub GetGPUPPixData: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outData: *mut *mut c_void) -> prSuiteError>, pub GetGPUPPixDeviceIndex: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outDeviceIndex: *mut csSDK_uint32) -> prSuiteError>, pub GetGPUPPixSize: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outSize: *mut usize) -> prSuiteError>,
}
Expand description

Access CUDA, OpenCL OR DirectX devices. All CUDA usage is through the CUDA device API.

Fields§

§GetDeviceCount: Option<unsafe extern "C" fn(outDeviceCount: *mut csSDK_uint32) -> prSuiteError>

Device enumeration

§GetDeviceInfo: Option<unsafe extern "C" fn(inSuiteVersion: csSDK_uint32, inDeviceIndex: csSDK_uint32, outDeviceInfo: *mut PrGPUDeviceInfo) -> prSuiteError>§AcquireExclusiveDeviceAccess: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32) -> prSuiteError>

Acquire/release exclusive access to inDeviceIndex. All calls below this point generally require access be held. For full GPU plugins (those that use a separate entry point for GPU rendering) exclusive access is always held. These calls do not need to be made in that case. For CUDA calls cuCtxPushCurrent/cuCtxPopCurrent on the current thread to manage the devices context.

§ReleaseExclusiveDeviceAccess: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32) -> prSuiteError>§AllocateDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inSizeInBytes: usize, outMemory: *mut *mut c_void) -> prSuiteError>

All device memory must be allocated through this suite. Purge should be called only in emergency situations when working with GPU memory that cannot be allocated through this suite (eg OpenGL memory). Returned pointer value represents memory allocated through cuMemAlloc or clCreateBuffer For DirectX, the memory is ID3D12Resource* created as CommittedResource on Default Heap

§FreeDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inMemory: *mut c_void) -> prSuiteError>§PurgeDeviceMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inRequestedBytesToPurge: usize, outBytesPurged: *mut usize) -> prSuiteError>§AllocateHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inSizeInBytes: usize, outMemory: *mut *mut c_void) -> prSuiteError>

All host (pinned) memory must be allocated through this suite. Purge should be called only in emergency situations when working with GPU memory that cannot be allocated through this suite (eg OpenGL memory). Returned pointer value represents memory allocated through cuMemHostAlloc or malloc. For DirectX, the memory is ID3D12Resource* created as CommittedResource on Upload Heap

§FreeHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inMemory: *mut c_void) -> prSuiteError>§PurgeHostMemory: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inRequestedBytesToPurge: usize, outBytesPurged: *mut usize) -> prSuiteError>§CreateGPUPPix: Option<unsafe extern "C" fn(inDeviceIndex: csSDK_uint32, inPixelFormat: PrPixelFormat, inWidth: c_int, inHeight: c_int, inPARNumerator: c_int, inPARDenominator: c_int, inFieldType: prFieldType, outPPixHand: *mut PPixHand) -> prSuiteError>

Information on a GPU ppix. The following ppix functions may also be used: -PrSDKPPixSuite::Dispose -PrSDKPPixSuite::GetBounds -PrSDKPPixSuite::GetRowBytes -PrSDKPPixSuite::GetPixelAspectRatio -PrSDKPPixSuite::GetPixelFormat -PrSDKPPix2Suite::GetFieldOrder

§GetGPUPPixData: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outData: *mut *mut c_void) -> prSuiteError>§GetGPUPPixDeviceIndex: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outDeviceIndex: *mut csSDK_uint32) -> prSuiteError>§GetGPUPPixSize: Option<unsafe extern "C" fn(inPPixHand: PPixHand, outSize: *mut usize) -> prSuiteError>

Trait Implementations§

Source§

impl Clone for PrSDKGPUDeviceSuite

Source§

fn clone(&self) -> PrSDKGPUDeviceSuite

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrSDKGPUDeviceSuite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for PrSDKGPUDeviceSuite

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.