aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ptx/src/ast.rs')
-rw-r--r--ptx/src/ast.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/ptx/src/ast.rs b/ptx/src/ast.rs
index f00ddce..7f2fc9a 100644
--- a/ptx/src/ast.rs
+++ b/ptx/src/ast.rs
@@ -542,6 +542,7 @@ pub enum Instruction<P: ArgParams> {
Div(DivDetails, Arg3<P>),
Sqrt(SqrtDetails, Arg2<P>),
Rsqrt(RsqrtDetails, Arg2<P>),
+ Neg(NegDetails, Arg2<P>),
}
#[derive(Copy, Clone)]
@@ -1183,6 +1184,12 @@ pub struct RsqrtDetails {
pub flush_to_zero: bool,
}
+#[derive(Copy, Clone, Eq, PartialEq)]
+pub struct NegDetails {
+ pub typ: ScalarType,
+ pub flush_to_zero: Option<bool>,
+}
+
impl<'a> NumsOrArrays<'a> {
pub fn to_vec(self, typ: SizedScalarType, dimensions: &mut [u32]) -> Result<Vec<u8>, PtxError> {
self.normalize_dimensions(dimensions)?;