IDMLDevice::CompileOperator method (directml.h)
Compiles an operator into an object that can be dispatched to the GPU.
A compiled operator represents the efficient, baked form of an operator suitable for execution on the GPU. A compiled operator holds state (such as shaders and other objects) required for execution. Because a compiled operator implements the IDMLPageable interface, you're able to evict one from GPU memory if you wish. See IDMLDevice::Evict and IDMLDevice::MakeResident for more info.
The compiled operator maintains a strong reference to the supplied IDMLOperator pointer.
Syntax
HRESULT CompileOperator(
IDMLOperator *op,
DML_EXECUTION_FLAGS flags,
REFIID riid,
[out] void **ppv
);
Parameters
op
Type: IDMLOperator*
The operator (created with IDMLDevice::CreateOperator) to compile.
flags
Type: DML_EXECUTION_FLAGS
Any flags to control the execution of this operator.
riid
Type: REFIID
A reference to the globally unique identifier (GUID) of the interface that you wish to be returned in ppv. This is expected to be the GUID of IDMLCompiledOperator.
[out] ppv
Type: void**
A pointer to a memory block that receives a pointer to the compiled operator. This is the address of a pointer to an IDMLCompiledOperator, representing the compiled operator created.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directml.h |
Library | DirectML.lib |
DLL | DirectML.dll |