update README with info about SSE2 on GCC
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sean Barrett · committed by Sean Barrett · parent e88fff6 · Browse files · 2 files·+32 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+32 added−0 removed
- other:+32 added−0 removed
Provenance
- Commit
c711058- Tree
604595a- Author
Sean Barrett <sean@nothings.org>- Committer
Sean Barrett <sean@nothings.org>- Parent
e88fff6
2 files changed+32 added−0 removed
modified:tools/README.footer.md+16 added
19 unmodified lines20212223242526272829303132333435363738394041424378 unmodified lines19 unmodified lines
No, because it's public domain you can freely relicense it to whatever license your newlibrary wants to be.
#### What's the deal with SSE support in GCC-based compilers?
stb_image will either use SSE2 (if you compile with -msse2) orwill not use any SIMD at all, rather than trying to detect theprocessor at runtime and handle it correctly. As I understand it,the approved path in GCC for runtime-detection requireyou to use multiple source files, one for each CPU configuration.Because stb_image is a header-file library that compiles in onlyone source file, there's no approved way to build both anSSE-enabled and a non-SSE-enabled variation.
While we've tried to work around it, we've had multiple issues overthe years due to specific versions of gcc breaking what we're doing,so we've given up on it. See https://github.com/nothings/stb/issues/280and https://github.com/nothings/stb/issues/410 for examples.
#### Some of these libraries seem redundant to existing open source libraries. Are they better somehow?
Generally they're only better in that they're easier to integrate,easier to use, and easier to release (single file; good API; no78 unmodified linesmodified:README.md+16 added
56 unmodified lines57 58 No, because it's public domain you can freely relicense it to whatever license your new59 library wants to be.60 61+#### What's the deal with SSE support in GCC-based compilers?62+63+stb_image will either use SSE2 (if you compile with -msse2) or64+will not use any SIMD at all, rather than trying to detect the65+processor at runtime and handle it correctly. As I understand it,66+the approved path in GCC for runtime-detection require67+you to use multiple source files, one for each CPU configuration.68+Because stb_image is a header-file library that compiles in only69+one source file, there's no approved way to build both an70+SSE-enabled and a non-SSE-enabled variation.71+72+While we've tried to work around it, we've had multiple issues over73+the years due to specific versions of gcc breaking what we're doing,74+so we've given up on it. See https://github.com/nothings/stb/issues/28075+and https://github.com/nothings/stb/issues/410 for examples.76+77 #### Some of these libraries seem redundant to existing open source libraries. Are they better somehow?78 79 Generally they're only better in that they're easier to integrate,80 easier to use, and easier to release (single file; good API; no78 unmodified lines