-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add weird trait thing (forgot to commit)
- Loading branch information
1 parent
445d6e5
commit 20d123d
Showing
4 changed files
with
110 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
pub use super::{CalyxFFI, CalyxFFIComponent, CalyxFFIComponentRef}; | ||
pub use calyx_ffi_macro::{calyx_ffi, calyx_ffi_test, calyx_ffi_tests}; | ||
|
||
#[macro_export] | ||
macro_rules! declare_calyx_interface { | ||
($name:ident($($input:ident),*) -> ($($output:ident),*)) => { | ||
pub trait $name: CalyxFFIComponent { | ||
$( | ||
fn $input(&mut self) -> &mut u64; | ||
)* | ||
$( | ||
fn $output(&self) -> u64; | ||
)* | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters