pub struct InlinePtxOp { /* private fields */ }Expand description
Inline PTX. Restricted to zero or one results because C++ semantics are too hard otherwise.
Note that this does not directly map to PTX, because it actually destructures vectors to PTX
vector expressions automatically. This means more than one register can be returned if it’s part
of a vector expression. To denote the difference, the syntax uses $0, $1 etc for Pliron
values, as opposed to the usual %0, %1 etc for the PTX registers.
§Attribute(s):
Note: Only attributes defined directly as part of this operation are listed here. There may be others, not listed here, defined by interface implementations.
| Name | Static Name Identifier | Type |
|---|---|---|
cuda_inline_ptx_ptx | ATTR_KEY_CUDA_INLINE_PTX_PTX | StringAttr |
cuda_inline_ptx_volatile | ATTR_KEY_CUDA_INLINE_PTX_VOLATILE | UnitAttr |
cuda_inline_ptx_clobbers | ATTR_KEY_CUDA_INLINE_PTX_CLOBBERS | VecAttr |
cuda_inline_ptx_memory_clobbers | ATTR_KEY_CUDA_INLINE_PTX_MEMORY_CLOBBERS | MemoryClobbersAttr |
cuda_inline_ptx_in_spec | ATTR_KEY_CUDA_INLINE_PTX_IN_SPEC | InputSpecsAttr |
Implementations§
Source§impl InlinePtxOp
impl InlinePtxOp
Sourcepub fn get_attr_cuda_inline_ptx_ptx<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, StringAttr>>
pub fn get_attr_cuda_inline_ptx_ptx<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, StringAttr>>
Get a Ref to the value of the attribute named cuda_inline_ptx_ptx.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_cuda_inline_ptx_ptx(&self, ctx: &Context, value: StringAttr)
pub fn set_attr_cuda_inline_ptx_ptx(&self, ctx: &Context, value: StringAttr)
Set the value of the attribute named cuda_inline_ptx_ptx.
Sourcepub fn get_attr_cuda_inline_ptx_volatile<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, UnitAttr>>
pub fn get_attr_cuda_inline_ptx_volatile<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, UnitAttr>>
Get a Ref to the value of the attribute named cuda_inline_ptx_volatile.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_cuda_inline_ptx_volatile(&self, ctx: &Context, value: UnitAttr)
pub fn set_attr_cuda_inline_ptx_volatile(&self, ctx: &Context, value: UnitAttr)
Set the value of the attribute named cuda_inline_ptx_volatile.
Sourcepub fn get_attr_cuda_inline_ptx_clobbers<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, VecAttr>>
pub fn get_attr_cuda_inline_ptx_clobbers<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, VecAttr>>
Get a Ref to the value of the attribute named cuda_inline_ptx_clobbers.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_cuda_inline_ptx_clobbers(&self, ctx: &Context, value: VecAttr)
pub fn set_attr_cuda_inline_ptx_clobbers(&self, ctx: &Context, value: VecAttr)
Set the value of the attribute named cuda_inline_ptx_clobbers.
Sourcepub fn get_attr_cuda_inline_ptx_memory_clobbers<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, MemoryClobbersAttr>>
pub fn get_attr_cuda_inline_ptx_memory_clobbers<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, MemoryClobbersAttr>>
Get a Ref to the value of the attribute named cuda_inline_ptx_memory_clobbers.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_cuda_inline_ptx_memory_clobbers(
&self,
ctx: &Context,
value: MemoryClobbersAttr,
)
pub fn set_attr_cuda_inline_ptx_memory_clobbers( &self, ctx: &Context, value: MemoryClobbersAttr, )
Set the value of the attribute named cuda_inline_ptx_memory_clobbers.
Sourcepub fn get_attr_cuda_inline_ptx_in_spec<'a>(
&self,
ctx: &'a Context,
) -> Option<Ref<'a, InputSpecsAttr>>
pub fn get_attr_cuda_inline_ptx_in_spec<'a>( &self, ctx: &'a Context, ) -> Option<Ref<'a, InputSpecsAttr>>
Get a Ref to the value of the attribute named cuda_inline_ptx_in_spec.
The Ref is a borrow of the containing Operation object.
Sourcepub fn set_attr_cuda_inline_ptx_in_spec(
&self,
ctx: &Context,
value: InputSpecsAttr,
)
pub fn set_attr_cuda_inline_ptx_in_spec( &self, ctx: &Context, value: InputSpecsAttr, )
Set the value of the attribute named cuda_inline_ptx_in_spec.
Source§impl InlinePtxOp
impl InlinePtxOp
pub fn new( ctx: &mut Context, result_ty: Option<TypeHandle>, ptx: impl Display, inputs: Vec<Value>, ) -> Self
pub fn new_volatile( ctx: &mut Context, result_ty: Option<TypeHandle>, ptx: impl Display, inputs: Vec<Value>, ) -> Self
pub fn set_clobbers(&self, ctx: &Context, clobbers: Vec<String>)
pub fn clobbers(&self, ctx: &Context) -> Vec<String>
pub fn raw_ptx<'a>(&self, ctx: &'a Context) -> Ref<'a, str>
pub fn is_volatile(&self, ctx: &Context) -> bool
pub fn inputs(&self, ctx: &Context) -> Vec<Value>
pub fn result(&self, ctx: &Context) -> Option<Value>
Trait Implementations§
Source§impl Clone for InlinePtxOp
impl Clone for InlinePtxOp
impl Copy for InlinePtxOp
impl Eq for InlinePtxOp
Source§impl Hash for InlinePtxOp
impl Hash for InlinePtxOp
Source§impl MemoryEffects for InlinePtxOp
impl MemoryEffects for InlinePtxOp
Source§impl Op for InlinePtxOp
impl Op for InlinePtxOp
Source§fn get_operation(&self) -> Ptr<Operation>
fn get_operation(&self) -> Ptr<Operation>
Source§fn get_opid_static() -> OpId
fn get_opid_static() -> OpId
Source§fn get_concrete_op_info() -> (fn(Ptr<Operation>) -> OpBox, TypeId)where
Self: Sized,
fn get_concrete_op_info() -> (fn(Ptr<Operation>) -> OpBox, TypeId)where
Self: Sized,
Source§impl OpToCPP<Cuda> for InlinePtxOp
impl OpToCPP<Cuda> for InlinePtxOp
Source§impl Parsable for InlinePtxOp
impl Parsable for InlinePtxOp
Source§type Arg = Vec<(Identifier, Location)>
type Arg = Vec<(Identifier, Location)>
Source§fn parse<'__pliron_parse>(
state_stream: &mut StateStream<'__pliron_parse>,
arg: Self::Arg,
) -> ParseResult<'__pliron_parse, Self::Parsed>
fn parse<'__pliron_parse>( state_stream: &mut StateStream<'__pliron_parse>, arg: Self::Arg, ) -> ParseResult<'__pliron_parse, Self::Parsed>
into on Parser::parse_stream to get the final ParseResult.
Use state_stream.state as necessary.Source§fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, PartialState = (), Output = Self::Parsed> + 'a>where
Self::Parsed: 'a,
fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, PartialState = (), Output = Self::Parsed> + 'a>where
Self::Parsed: 'a,
Source§impl PartialEq for InlinePtxOp
impl PartialEq for InlinePtxOp
Source§impl Printable for InlinePtxOp
impl Printable for InlinePtxOp
Source§impl SideEffects for InlinePtxOp
impl SideEffects for InlinePtxOp
Source§fn has_side_effects(&self, ctx: &Context) -> bool
fn has_side_effects(&self, ctx: &Context) -> bool
true if the operation has side effects, and false otherwise.impl StructuralPartialEq for InlinePtxOp
Auto Trait Implementations§
impl !RefUnwindSafe for InlinePtxOp
impl !UnwindSafe for InlinePtxOp
impl Freeze for InlinePtxOp
impl Send for InlinePtxOp
impl Sync for InlinePtxOp
impl Unpin for InlinePtxOp
impl UnsafeUnpin for InlinePtxOp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more