Share via


MPSGraphMemoryOps_Extensions.Constant Method

Definition

Overloads

Constant(MPSGraph, Single)

public static MetalPerformanceShadersGraph.MPSGraphTensor Constant(this MetalPerformanceShadersGraph.MPSGraph graph, float scalar);
static member Constant : MetalPerformanceShadersGraph.MPSGraph * single -> MetalPerformanceShadersGraph.MPSGraphTensor

Parameters

graph
MPSGraph
scalar
Single

Returns

Applies to

Constant(MPSGraph, ReadOnlySpan<Single>, Int32[])

public static MetalPerformanceShadersGraph.MPSGraphTensor Constant(this MetalPerformanceShadersGraph.MPSGraph graph, ReadOnlySpan<float> values, int[] shape);
static member Constant : MetalPerformanceShadersGraph.MPSGraph * ReadOnlySpan<single> * int[] -> MetalPerformanceShadersGraph.MPSGraphTensor

Parameters

graph
MPSGraph
shape
Int32[]

Returns

Applies to