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

Add template aliases SQ and UQ in FixedPointsCommon #91

Open
Pharap opened this issue Mar 26, 2021 · 0 comments
Open

Add template aliases SQ and UQ in FixedPointsCommon #91

Pharap opened this issue Mar 26, 2021 · 0 comments
Assignees
Labels
Feature Request This issue is a request for a particular feature Minor This change is a minor addition

Comments

@Pharap
Copy link
Owner

Pharap commented Mar 26, 2021

Add template aliases SQ<I, F> and UQ<I, F> to FixedPointsCommon.h.

These would effectively serve as a more convinient short-hand for those who are familiar with Q notation and would probably be direct aliases for SFixed and UFixed.

I.e.

template< unsigned Integer, unsigned Fraction >
using SQ = SFixed<Integer, Fraction>;

template< unsigned Integer, unsigned Fraction >
using UQ = UFixed<Integer, Fraction>;

If this change is made after the resolution of #19 then it may be worth having a more complex implementation that also permits a single template parameter when no integer part is desired.

@Pharap Pharap added Feature Request This issue is a request for a particular feature Minor This change is a minor addition labels Mar 26, 2021
@Pharap Pharap self-assigned this Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request This issue is a request for a particular feature Minor This change is a minor addition
Projects
None yet
Development

No branches or pull requests

1 participant