pub struct PhasorFieldDescriptor {
pub rows: usize,
pub cols: usize,
pub real: Tensor,
pub imag: Tensor,
}Expand description
Tensor-backed runtime phasor field.
The two component Tensors always have shape [rows, cols], the same real
dtype, and compatible placement. No complex or grid storage is introduced.
Fields§
§rows: usizeRow count.
cols: usizeColumn count.
real: TensorCanonical real-component Tensor.
imag: TensorCanonical imaginary-component Tensor.
Implementations§
Source§impl PhasorFieldDescriptor
impl PhasorFieldDescriptor
Sourcepub fn new(rows: usize, cols: usize, real: Tensor, imag: Tensor) -> Result<Self>
pub fn new(rows: usize, cols: usize, real: Tensor, imag: Tensor) -> Result<Self>
Admits two compatible canonical component Tensors.
Sourcepub fn from_host(field: HostPhasorField) -> Result<Self>
pub fn from_host(field: HostPhasorField) -> Result<Self>
Moves a reference host field into two typed f64 Tensor storages.
The component buffers are consumed and shared directly by their Tensor; there is no intermediate grid or per-cell runtime-value allocation.
Sourcepub fn materialize_host(&self, cx: &mut Cx) -> Result<HostPhasorField>
pub fn materialize_host(&self, cx: &mut Cx) -> Result<HostPhasorField>
Explicitly materializes both components into one host field.
Each resident Tensor receives exactly one materialize call. Host
storage remains zero-copy until the returned HostPhasorField takes its
owned f64 component buffers.
Trait Implementations§
Source§impl Citizen for PhasorFieldDescriptor
impl Citizen for PhasorFieldDescriptor
Source§fn citizen_symbol() -> Symbol
fn citizen_symbol() -> Symbol
namespace/name class symbol.Source§fn citizen_version() -> u32
fn citizen_version() -> u32
Source§fn citizen_arity() -> usize
fn citizen_arity() -> usize
Source§fn citizen_fields() -> &'static [&'static str]
fn citizen_fields() -> &'static [&'static str]
Source§impl CitizenRuntime for PhasorFieldDescriptor
impl CitizenRuntime for PhasorFieldDescriptor
Source§fn citizen_info() -> CitizenInfo
fn citizen_info() -> CitizenInfo
Source§impl Clone for PhasorFieldDescriptor
impl Clone for PhasorFieldDescriptor
Source§fn clone(&self) -> PhasorFieldDescriptor
fn clone(&self) -> PhasorFieldDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PhasorFieldDescriptor
impl Debug for PhasorFieldDescriptor
Source§impl Object for PhasorFieldDescriptor
impl Object for PhasorFieldDescriptor
Source§fn display(&self, cx: &mut Cx) -> Result<String>
fn display(&self, cx: &mut Cx) -> Result<String>
Source§fn header(&self) -> &ObjectHeader
fn header(&self) -> &ObjectHeader
Source§fn op(&self, _key: &OpKey) -> Option<&dyn Op>
fn op(&self, _key: &OpKey) -> Option<&dyn Op>
key, if any.Source§impl ObjectCompat for PhasorFieldDescriptor
impl ObjectCompat for PhasorFieldDescriptor
Source§fn class(&self, cx: &mut Cx) -> Result<ClassRef>
fn class(&self, cx: &mut Cx) -> Result<ClassRef>
Source§fn as_expr(&self, cx: &mut Cx) -> Result<Expr>
fn as_expr(&self, cx: &mut Cx) -> Result<Expr>
Source§fn as_object_encoder(&self) -> Option<&dyn ObjectEncode>
fn as_object_encoder(&self) -> Option<&dyn ObjectEncode>
Source§fn as_callable(&self) -> Option<&dyn Callable>
fn as_callable(&self) -> Option<&dyn Callable>
Source§fn as_read_constructor(&self) -> Option<&dyn ReadConstructor>
fn as_read_constructor(&self) -> Option<&dyn ReadConstructor>
Source§fn as_number_domain(&self) -> Option<&(dyn NumberDomain + 'static)>
fn as_number_domain(&self) -> Option<&(dyn NumberDomain + 'static)>
Source§fn as_number_value(&self) -> Option<&dyn NumberValue>
fn as_number_value(&self) -> Option<&dyn NumberValue>
Source§fn as_eval_fabric(&self) -> Option<&dyn EvalFabric>
fn as_eval_fabric(&self) -> Option<&dyn EvalFabric>
Source§fn as_sequence(&self) -> Option<&dyn Sequence>
fn as_sequence(&self) -> Option<&dyn Sequence>
Source§fn as_list(&self) -> Option<&(dyn ListValue + 'static)>
fn as_list(&self) -> Option<&(dyn ListValue + 'static)>
Source§fn as_table_impl(&self) -> Option<&(dyn Table + 'static)>
fn as_table_impl(&self) -> Option<&(dyn Table + 'static)>
Source§fn as_dir(&self) -> Option<&(dyn Dir + 'static)>
fn as_dir(&self) -> Option<&(dyn Dir + 'static)>
Source§fn truth(&self, _cx: &mut Cx) -> Result<bool, Error>
fn truth(&self, _cx: &mut Cx) -> Result<bool, Error>
Source§impl ObjectEncode for PhasorFieldDescriptor
impl ObjectEncode for PhasorFieldDescriptor
Source§fn object_encoding(&self, cx: &mut Cx) -> Result<ObjectEncoding>
fn object_encoding(&self, cx: &mut Cx) -> Result<ObjectEncoding>
ObjectEncoding this object should be rendered as.