Skip to content

Template specialization didnt work after addition of default constructor #7793

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

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

deepikabhavnani
Copy link

Description

Template specialization didn't work after addition of default constructor for unsupported polynomials. Since the argument type and count are same, compiler always selects the default constructor.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change

Template specialization didn't work after addition of default constructor
for unsupported polynomials. Since the argument type and count are same,
compiler always selects the default constructor.
@deepikabhavnani
Copy link
Author

deepikabhavnani commented Aug 14, 2018

@geky - Verified in build, only polynomial used is linked.

Size with 32-bit ANSI CRC
| mbed-os\drivers\TableCRC.o | 64 | 0 | 0 |

Size with 16-bit CRC
| mbed-os\drivers\TableCRC.o | 512 | 0 | 0 |

@cmonr
Copy link
Contributor

cmonr commented Aug 15, 2018

@deepikabhavnani Does the size increase with the 16-bit CRC? What is the 512 value?

@cmonr cmonr requested a review from geky August 15, 2018 03:18
@deepikabhavnani
Copy link
Author

Default size of CRC table is 256 elements and each element equivalent to size of polynomial. Hence for 16-bit CRC it is 256*2.

32-bit polynomial table was optimised recently and it is 16 * 4 byte long.

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Thanks for testing if the tables got optimized out

@cmonr
Copy link
Contributor

cmonr commented Aug 15, 2018

Will start CI once load has gone down.

@cmonr
Copy link
Contributor

cmonr commented Aug 17, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 17, 2018

Build : SUCCESS

Build number : 2827
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7793/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@cmonr
Copy link
Contributor

cmonr commented Aug 17, 2018

/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Aug 17, 2018

@cmonr
Copy link
Contributor

cmonr commented Aug 17, 2018

Weird. It looks like it didn't even try to build certain targets.

Going to see if this was a fluke.
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Aug 17, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 18, 2018

@deepikabhavnani
Copy link
Author

/morph uvisor-test

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 20, 2018

@deepikabhavnani Known issue with uvisor CI, we are investigating

@NirSonnenschein
Copy link
Contributor

/morph uvisor-test

@cmonr cmonr merged commit 0d0402d into ARMmbed:master Aug 21, 2018
@deepikabhavnani deepikabhavnani deleted the crc_template_fix branch August 21, 2018 14:54
@deepikabhavnani
Copy link
Author

Hello.. CRC PR's #7735, #7781, #7793 and #7824 are related and will be better to have them all in one patch. Can we change the tag of merged PR's to next patch

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Template specialization didnt work after addition of default constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants