Skip to content

Commit

Permalink
fix: 补充宏调用自己时的约束符
Browse files Browse the repository at this point in the history
Signed-off-by: YdrMaster <[email protected]>
  • Loading branch information
YdrMaster committed Nov 21, 2024
1 parent 7c41ff5 commit 98689da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "digit-layout"
description = "This crate provides a unified data type definition across various libraries, efficiently encodes types in a compact layout, thus avoiding the redundancy of enumerating definitions for data types."
version = "0.2.0-alpha.1"
version = "0.2.0-alpha.2"
edition = "2021"
authors = ["YdrMaster <[email protected]>"]
repository = "https://github.com/InfiniTensor/digit-layout.git"
Expand Down
8 changes: 4 additions & 4 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ macro_rules! layout {
};

($name:ident u($bits:expr)) => {
layout!($name u($bits); 1);
$crate::layout!($name u($bits); 1);
};
($name:ident i($bits:expr)) => {
layout!($name e(0)m($bits - 1); 1);
$crate::layout!($name e(0)m($bits - 1); 1);
};
($name:ident e($exponent:expr)m($mantissa:expr)) => {
layout!($name e($exponent)m($mantissa); 1);
$crate::layout!($name e($exponent)m($mantissa); 1);
};
($name:ident; [$group:expr] in $size:expr) => {
layout!($name = stringify!($name); [$group] in $size);
$crate::layout!($name = stringify!($name); [$group] in $size);
};
}

0 comments on commit 98689da

Please sign in to comment.