Table of Contents

Class ConstNode

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll
public sealed class ConstNode : NDExpr
Inheritance
ConstNode
Inherited Members
Extension Methods

Constructors

ConstNode(double)

public ConstNode(double v)

Parameters

v double

ConstNode(int)

public ConstNode(int v)

Parameters

v int

ConstNode(long)

public ConstNode(long v)

Parameters

v long

ConstNode(float)

public ConstNode(float v)

Parameters

v float

Properties

SupportsSimd

True if this node and its entire sub-tree have a SIMD emit path. Structural and type-independent — prefer SupportsSimdAt(NPTypeCode) for the compile decision, since some ops only vectorize at certain element types/runtimes.

public override bool SupportsSimd { get; }

Property Value

bool

Methods

AppendSignature(StringBuilder)

Stable structural signature. Used to derive a cache key when the user doesn't supply one.

public override void AppendSignature(StringBuilder sb)

Parameters

sb StringBuilder

EmitScalar(ILGenerator, NDExprCompileContext)

Emit scalar code. On exit, the evaluation stack must have exactly one value of dtype ctx.OutputType.

public override void EmitScalar(ILGenerator il, NDExprCompileContext ctx)

Parameters

il ILGenerator
ctx NDExprCompileContext

EmitVector(ILGenerator, NDExprCompileContext)

Emit vector code. On exit, the evaluation stack must have exactly one Vector{W}<T> of element type ctx.OutputType. Called only when SupportsSimd is true and all input types equal the output type.

public override void EmitVector(ILGenerator il, NDExprCompileContext ctx)

Parameters

il ILGenerator
ctx NDExprCompileContext