Convert SSE intrinsics to readable C/C++ code? -


i've inherited highly optimized (sse4), uncommented c code. there tools or utilities convert sse intrinsics more readable code or pseudocode? readability understand code better before digging in , making changes.

i not know of such tool.

but not anyway. if sse code optimized well, hard part not decoding intrinsics. hard part following tricks improve locality , eliminate intra-iteration data dependencies (stripmining, polyhedral loop transformations, etc.)

i can give suggestion going forward, however: have well-commented scalar version of same routine written in simplest possible way. "reference code" should care readability , correctness, not speed... should have plenty of assertions. have test suite can exercise both scalar version , optimized variant(s).

whether implementing routine first time, or updating existing routine, start reference code , test suite. not in order.

this approach more expensive front, much cheaper in long run.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -