IDMLDevice::CreateOperator method (directml.h)

Creates a DirectML operator.

In DirectML, an operator represents an abstract bundle of functionality, which can be compiled into a form suitable for execution on the GPU. Operator objects cannot be executed directly; they must first be compiled into an IDMLCompiledOperator.

Syntax

HRESULT CreateOperator(
        const DML_OPERATOR_DESC *desc,
        REFIID                  riid,
  [out] void                    **ppv
);

Parameters

desc

Type: const DML_OPERATOR_DESC*

The description of the operator to be created.

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 IDMLOperator.

[out] ppv

Type: void**

A pointer to a memory block that receives a pointer to the operator. This is the address of a pointer to an IDMLOperator, representing the 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

See also

IDMLDevice

IDMLDevice::CompileOperator