Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The types of the generics in crypto_accelerator extern maybe should be a static type instead of a generics #86

Open
apinski-cavium opened this issue Nov 14, 2022 · 0 comments

Comments

@apinski-cavium
Copy link
Contributor

An example is at:

void set_auth_data_offset<T>(in T offset);

void set_auth_data_offset<T>(in T offset);

The type checking for this will be done in the backend rather than the front-end.
It would be useful for these type T would be a static type (say bit<32>) which will reduce how much type checking needs to be done in the backend.
If we really want to use generics here, it would be useful to explain what types are valid in the header file. E.g say all bit<N>, int<N> types, and serializable enums. (yes it might be obvious but sometimes being explicit is makes it less ambiguous as say you have a struct which is just wrapping an bit type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant