From fcf83dbf9effab3bd98bad2b83b2468b7eb05cfd Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 9 Jun 2017 11:34:21 -0700 Subject: Initial import of code. --- source/slang/intrinsic-defs.h | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 source/slang/intrinsic-defs.h (limited to 'source/slang/intrinsic-defs.h') diff --git a/source/slang/intrinsic-defs.h b/source/slang/intrinsic-defs.h new file mode 100644 index 000000000..19a3899a3 --- /dev/null +++ b/source/slang/intrinsic-defs.h @@ -0,0 +1,94 @@ +// intrinsic-defs.h + +// The file is meant to be included multiple times, to produce different +// pieces of code related to intrinsic operations +// +// Each intrinsic op is declared here with: +// +// INTRINSIC(name) +// + +#ifndef INTRINSIC +#error Need to define INTRINSIC(NAME) before including "intrinsic-defs.h" +#endif + +INTRINSIC(Add) +INTRINSIC(Sub) +INTRINSIC(Mul) +INTRINSIC(Div) +INTRINSIC(Mod) + +INTRINSIC(Lsh) +INTRINSIC(Rsh) + +INTRINSIC(Eql) +INTRINSIC(Neq) +INTRINSIC(Greater) +INTRINSIC(Less) +INTRINSIC(Geq) +INTRINSIC(Leq) +INTRINSIC(BitAnd) +INTRINSIC(BitXor) +INTRINSIC(BitOr) + +// TODO(tfoley): need to distinguish short-circuiting and not... +INTRINSIC(And) +INTRINSIC(Or) + +INTRINSIC(Assign) +INTRINSIC(AddAssign) +INTRINSIC(SubAssign) +INTRINSIC(MulAssign) +INTRINSIC(DivAssign) +INTRINSIC(ModAssign) +INTRINSIC(LshAssign) +INTRINSIC(RshAssign) +INTRINSIC(OrAssign) +INTRINSIC(AndAssign) +INTRINSIC(XorAssign) +INTRINSIC(Neg) +INTRINSIC(Not) +INTRINSIC(BitNot) +INTRINSIC(PreInc) +INTRINSIC(PreDec) +INTRINSIC(PostInc) +INTRINSIC(PostDec) + +INTRINSIC(Sequence) +INTRINSIC(Select) + +INTRINSIC(Mul_Scalar_Scalar) +INTRINSIC(Mul_Vector_Scalar) +INTRINSIC(Mul_Scalar_Vector) +INTRINSIC(Mul_Matrix_Scalar) +INTRINSIC(Mul_Scalar_Matrix) +INTRINSIC(InnerProduct_Vector_Vector) +INTRINSIC(InnerProduct_Vector_Matrix) +INTRINSIC(InnerProduct_Matrix_Vector) +INTRINSIC(InnerProduct_Matrix_Matrix) + + + + + + + + + + + + + + + + + + + + + + + + +// Un-deefine the macor here, so that the client does not have to. +#undef INTRINSIC -- cgit v1.2.3