Consider Supporting Clang Language Extensions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- cpp, wasm
- Domain
- compilers, computer-graphics
Research direction
No source file or test is named. Start by running the supplied clang++/wasm-ld command with the cited Clang extensions, then inspect the output with wasm2wat; done would require a concrete feasibility result and a defined DirectXMath support scope.
Written by the indexing model from the issue text.
Description
Given that you can compile your project using DirectXMath with clang++ and wasm-ld on Ubuntu (WSL):
clang++ -std=c++17 --target=wasm32 -nostdlib -Wl,--no-entry -Wl,--export-all -D_XM_NO_INTRINSICS_ -I. -isystem ./external/ -isystem
./external/DirectXMath/Inc/ -o demo.wasm demo.cc math.cc
And given that Clang supports these extensions among other extensions:
Supports the GCC, OpenCL, AltiVec, NEON, SVE and RVV vector extensions.
typedef float m4x4_t __attribute__((matrix_type(4, 4)));
m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {
return a + b * c;
}
I wonder if those extensions work for Clang's wasm32 target and if it is worthwhile to support those very language extensions within DirectXMath.
If all those compiler extensions result in the use of SIMD types and functions inside the WebAssembly binary file (you can use wasm2wat to inspect your binary file), I think it is worthwhile to support those compiler extensions.
Also, consider: https://v8.dev/features/simd
I will build my WebAssembly binary with -D_XM_NO_INTRINSICS_ for now.
Source:
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 262
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXMath
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/DirectXMath#346 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/DirectXMath#342 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/DirectXMath#328 ·
-
simplemath
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/DirectXMath#327 · 1 comment ·
-
Project feedback Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/DirectXMath#326 · 2 comments ·
All issues in microsoft/DirectXMath
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100