Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General overview:
WASM.h
that implements the basic functions usingwasm_
-intrinsicsFASTNOISE2_SCALAR_ONLY
Cmake option in order for consumers to be able to build scalar-only version of library (may be useful for some other exotic platform that doesn't [fully] support SIMD)SIMDUnitTest.cpp
to support WASMSome notes:
All test except for
InvSqrt_f32
are passing. TheInvSqrt_f32
is implemented as full-precision reciprocal of square root, so I guess it's failing tests because of its full precisionSome of the failing InvSqrt_f32 tests
I added
target_link_options(FastNoise PRIVATE -sALLOW_MEMORY_GROWTH=1)
in the main CMakeLists and the one for tests. Maybe that wasn't a good idea, because a consumer-application may want to control this propertyAt
WASM.h:132
I use__f32x4
as underlying type but it's actually an internal type and not a user-facing one. However without it some of the functions won't work as expectedI didn't try to compile the NoiseTool, since it's outside of scope of my work, so I don't know if it works
The only tests I ran were the ones in "SIMDUnitTest.cpp", let me know if there are other tests I need to check