• Slang Standard Library Reference
    • Interfaces
      • IArithmetic
      • IArithmeticAtomicable
      • IArray
      • IAtomicable
      • IBitAtomicable
      • IBufferDataLayout
      • IComparable
      • IDefaultInitializable
      • IDiffTensorWrapper
      • IDifferentiable
      • IDifferentiableFunc
      • IDifferentiableMutatingFunc
      • IDifferentiablePtrType
      • IFloat
      • IFunc
      • IInteger
      • ILogical
      • IMutatingFunc
      • IOpaqueDescriptor
      • IPhysicalBuffer
      • IRWArray
      • IRWPhysicalBuffer
      • IRangedValue
      • ITexelElement
      • __BuiltinArithmeticType
      • __BuiltinFloatingPointType
      • __BuiltinIntegerType
      • __BuiltinLogicalType
      • __ITextureShape
      • __ITextureShape1D2D3D
    • Types
    • Attributes
    • Global Declarations

interface IDifferentiablePtrType

Experimental Feature

The feature described in this page is marked as experimental, and may be subject to change in future releases. Users are advised that any code that depend on this feature may not be compilable by future versions of the compiler.

Description

The IDifferentiablePtrType interface requires the following definitions.

interface IDifferentiablePtrType
{
    associatedtype Differential : IDifferentiablePtrType
        where Differential.Differential == Differential;
}

Types that conform to this interface can be used with DifferentialPtrPair<T> to pass the derivative components to calls to fwd_diff(fn) or bwd_diff(fn)

See the auto-diff user guide for more details (https://shader-slang.org/slang/user-guide/autodiff.html#differentiable-ptr-types)

Associated types

_Differential

Constraints:

  • IDifferentiablePtrType.This.Differential : IDifferentiablePtrType

Remarks

Support for this interface is still experimental and subject to change.