forked from M-Labs/nac3
1
0
Fork 0

core/toplevel: reorganize PrimDef

This commit is contained in:
lyken 2024-07-26 10:58:15 +08:00 committed by sb10q
parent 8c5ba37d09
commit 339b74161b
1 changed files with 29 additions and 21 deletions

View File

@ -27,17 +27,22 @@ pub enum PrimDef {
List, List,
NDArray, NDArray,
// Member Functions // Option methods
OptionIsSome, OptionIsSome,
OptionIsNone, OptionIsNone,
OptionUnwrap, OptionUnwrap,
// Option-related functions
FunSome,
// NDArray methods
NDArrayCopy, NDArrayCopy,
NDArrayFill, NDArrayFill,
FunInt32,
FunInt64, // Range methods
FunUInt32, FunRangeInit,
FunUInt64,
FunFloat, // NumPy & SciPy functions
FunNpNDArray, FunNpNDArray,
FunNpEmpty, FunNpEmpty,
FunNpZeros, FunNpZeros,
@ -46,28 +51,15 @@ pub enum PrimDef {
FunNpArray, FunNpArray,
FunNpEye, FunNpEye,
FunNpIdentity, FunNpIdentity,
FunRound,
FunRound64,
FunNpRound, FunNpRound,
FunRangeInit,
FunStr,
FunBool,
FunFloor,
FunFloor64,
FunNpFloor, FunNpFloor,
FunCeil,
FunCeil64,
FunNpCeil, FunNpCeil,
FunLen,
FunMin,
FunNpMin, FunNpMin,
FunNpMinimum, FunNpMinimum,
FunNpArgmin, FunNpArgmin,
FunMax,
FunNpMax, FunNpMax,
FunNpMaximum, FunNpMaximum,
FunNpArgmax, FunNpArgmax,
FunAbs,
FunNpIsNan, FunNpIsNan,
FunNpIsInf, FunNpIsInf,
FunNpSin, FunNpSin,
@ -106,8 +98,24 @@ pub enum PrimDef {
FunNpHypot, FunNpHypot,
FunNpNextAfter, FunNpNextAfter,
// Top-Level Functions // Miscellaneous
FunSome, FunInt32,
FunInt64,
FunUInt32,
FunUInt64,
FunFloat,
FunRound,
FunRound64,
FunStr,
FunBool,
FunFloor,
FunFloor64,
FunCeil,
FunCeil64,
FunLen,
FunMin,
FunMax,
FunAbs,
} }
/// Associated details of a [`PrimDef`] /// Associated details of a [`PrimDef`]