pub enum NonSemantic {
EnterDebugScope,
ExitDebugScope,
Print {
format_string: String,
args: Vec<Variable>,
},
Comment {
content: String,
},
}
Expand description
Operations that don’t change the semantics of the kernel. In other words, operations that do not
perform any computation, if they run at all. i.e. println
, comments and debug symbols.
Can be safely removed or ignored without changing the kernel result.
Variants§
EnterDebugScope
Enter a new debug scope, this happens recursively when a cube function is called and inlined into the kernel. Should push a new frame onto the debug call stack.
ExitDebugScope
Exit a debug scope and resume execution at the previous stack frame.
Print a formatted string with arguments to the backend’s debugging facilit (i.e. validation layer). The syntax of the format string depends on the backend, but tends to follow C++ convention.
Comment
Insert a comment into the compiled source
Trait Implementations§
Source§impl Clone for NonSemantic
impl Clone for NonSemantic
Source§fn clone(&self) -> NonSemantic
fn clone(&self) -> NonSemantic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NonSemantic
impl Debug for NonSemantic
Source§impl<'de> Deserialize<'de> for NonSemantic
impl<'de> Deserialize<'de> for NonSemantic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NonSemantic
impl Display for NonSemantic
Source§impl From<<NonSemantic as OperationReflect>::OpCode> for OpCode
impl From<<NonSemantic as OperationReflect>::OpCode> for OpCode
Source§fn from(value: <NonSemantic as OperationReflect>::OpCode) -> Self
fn from(value: <NonSemantic as OperationReflect>::OpCode) -> Self
Converts to this type from the input type.
Source§impl From<NonSemantic> for Instruction
impl From<NonSemantic> for Instruction
Source§fn from(value: NonSemantic) -> Self
fn from(value: NonSemantic) -> Self
Converts to this type from the input type.
Source§impl From<NonSemantic> for Operation
impl From<NonSemantic> for Operation
Source§fn from(value: NonSemantic) -> Self
fn from(value: NonSemantic) -> Self
Converts to this type from the input type.
Source§impl Hash for NonSemantic
impl Hash for NonSemantic
Source§impl OperationReflect for NonSemantic
impl OperationReflect for NonSemantic
Source§type OpCode = NonSemanticOpCode
type OpCode = NonSemanticOpCode
Type of the op codes for this operation
Source§fn args(&self) -> Option<Vec<Variable>>
fn args(&self) -> Option<Vec<Variable>>
Get the list of arguments for this operation. If not all arguments are
Variable
, returns
None
instead.Source§fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
Create typed operation from an opcode and a list of arguments. Returns
None
if not all
arguments are Variable
.Source§fn is_commutative(&self) -> bool
fn is_commutative(&self) -> bool
Whether this operation is commutative (arguments can be freely reordered). Ignored for
single argument operations.
Source§impl PartialEq for NonSemantic
impl PartialEq for NonSemantic
Source§impl Serialize for NonSemantic
impl Serialize for NonSemantic
Source§impl TypeHash for NonSemantic
impl TypeHash for NonSemantic
impl Eq for NonSemantic
impl StructuralPartialEq for NonSemantic
Auto Trait Implementations§
impl Freeze for NonSemantic
impl RefUnwindSafe for NonSemantic
impl Send for NonSemantic
impl Sync for NonSemantic
impl Unpin for NonSemantic
impl UnwindSafe for NonSemantic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.