From 88d0467a168ddaa8032dc9cf5313967ee5bf6084 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 25 Sep 2024 13:19:05 -0700 Subject: [PATCH 1/2] add support for spacing --- substrate/src/layout/placement/array.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/substrate/src/layout/placement/array.rs b/substrate/src/layout/placement/array.rs index 0ae57a1..a5ab555 100644 --- a/substrate/src/layout/placement/array.rs +++ b/substrate/src/layout/placement/array.rs @@ -42,12 +42,24 @@ impl<'a> ArrayTilerBuilder<'a> { self } + #[inline] + pub fn space(&mut self, space: i64) -> &mut Self { + self.space = Some(space); + self + } + #[inline] pub fn alt_mode(&mut self, mode: impl Into) -> &mut Self { self.alt_mode = Some(mode.into()); self } + #[inline] + pub fn alt_space(&mut self, alt_space: i64) -> &mut Self { + self.alt_space = Some(alt_space); + self + } + #[inline] pub fn push<'b>(&mut self, tile: impl Into>) -> &mut Self where From cd351c1c5867aecb7aeaa809f0b805f1da7ee7a6 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 25 Sep 2024 13:20:52 -0700 Subject: [PATCH 2/2] fix compiler errors --- substrate/src/layout/placement/array.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/src/layout/placement/array.rs b/substrate/src/layout/placement/array.rs index a5ab555..e94a647 100644 --- a/substrate/src/layout/placement/array.rs +++ b/substrate/src/layout/placement/array.rs @@ -44,7 +44,7 @@ impl<'a> ArrayTilerBuilder<'a> { #[inline] pub fn space(&mut self, space: i64) -> &mut Self { - self.space = Some(space); + self.space = space; self } @@ -56,7 +56,7 @@ impl<'a> ArrayTilerBuilder<'a> { #[inline] pub fn alt_space(&mut self, alt_space: i64) -> &mut Self { - self.alt_space = Some(alt_space); + self.alt_space = alt_space; self }