compute.tensor · thing ·
tensorView
A tensor view record carrying label, shape, placement, offset.
Represent tensor shapes, layouts, and numerical storage contracts.
external thing tensorViewStatus: source-declared
Fields and methods (15)
text label- Stores label as text.
tensorShape shape- Stores shape as tensorShape.
tensorPlacement placement- Stores placement as tensorPlacement.
int offset- Stores offset as int.
tensorView(text label, tensorShape shape, tensorPlacement placement)- Tensor view.
SetOffset(int offset)- Set offset. Complete example
ValidationIssue() returns text- Validation issue. Complete example
Validate() returns bool- Validate. Complete example
ValidateOrThrow()- Validate or throw. Complete example
Rank() returns int- Rank. Complete example
ElementCount() returns int- Element count. Complete example
IsContiguous() returns bool- Is contiguous. Complete example
SliceAxis(int axis, int start, int length) returns tensorView- Slice axis. Complete example
Transpose(list of int axisOrder) returns tensorView- Transpose. Complete example
Describe() returns text- Describe. Complete example
Use tensorView
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using compute.tensor
// Represent tensor shapes, layouts, and numerical storage contracts.
tensorView sample = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
Console.Log(Text.From(sample.label))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.SetOffset
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Set offset.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
int argument_offset = 1
instance.SetOffset(argument_offset)
Console.Log("SetOffset completed")
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.ValidationIssue
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Validation issue.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
text result = instance.ValidationIssue()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.Validate
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Validate.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
bool result = instance.Validate()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.ValidateOrThrow
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Validate or throw.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
instance.ValidateOrThrow()
Console.Log("ValidateOrThrow completed")
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.Rank
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Rank.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
int result = instance.Rank()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.ElementCount
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Element count.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
int result = instance.ElementCount()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.IsContiguous
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Is contiguous.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
bool result = instance.IsContiguous()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.SliceAxis
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Slice axis.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
int argument_axis = 1
int argument_start = 1
int argument_length = 1
tensorView result = instance.SliceAxis(argument_axis, argument_start, argument_length)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.Transpose
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Transpose.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
list of int argument_axisOrder = []
tensorView result = instance.Transpose(argument_axisOrder)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
tensorView.Describe
A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.
cpu · method · source-example · type checked
using compute.tensor
// Describe.
tensorView instance = tensorView("Player health", tensorShape("element Type", []), tensorPlacement("device", "memory"))
text result = instance.Describe()
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/compute/tensor/tensor.yh:253