Comments (6)
Hi again @plekakis, thanks for the request! I have been toying around with the code and I think it can be implemented, with the following restrictions:
-
It will only be implemented for float4x4 and float3x3 matrices, which are the most common matrices anyway. float2x2 cannot be implemented because the physical layout of float2 doesn't match the physical layout of float2x2 (because a float2x2 is like a float4 internally). Other matrices have the same problems, for instance float4x2 and float2x4 have the same physical layout. They are probably rarely used and not worth the extra complexity.
-
For vectors, I cannot provide the same behavior as swizzling, so it will access the f32[] union and it's up to the compiler to generate the appropriate code. I'd expect a nice compiler to produce nice code if it's just initialization, for other operations I don't really know.
It won't be like hlsl other than in those limited cases, just due to the nature of SIMD and how the library has been designed. If this is acceptable I think I can have it in no time.
from hlslpp.
from hlslpp.
@plekakis Let me know if that works for you or if there's anything else you need
Closed via c275bcf
from hlslpp.
Unfortunately it looks like what I've done has upset gcc. I need to find an alternative
from hlslpp.
Fixed via 165fe75
I just noticed that GCC in AVX will be broken for the same reason. Since I don't test it I wasn't really aware. This is related to the swizzles. I wonder if there's anything else I can do. Unrelated to this bug but I'll leave a note.
from hlslpp.
from hlslpp.
Related Issues (20)
- Memory packing difference C++ <-> HLSL HOT 16
- Integer vector division is working incorrectly on Macs with Apple M1 (ARM) HOT 7
- Integer vector comparison is working incorrectly on Intel based Macs with MacOS >= 11 HOT 3
- Improve HLSL++ unit tests by using full-featured testing framework HOT 2
- operator / (float1, float3) looks inverted HOT 8
- How well does this cover HLSL202x? HOT 11
- * operator brake mult function in quaternion HOT 7
- Quaternion slerp returning nan values HOT 2
- Clang error: unused variable 't4' in hlsl++_quaternion.h HOT 6
- Upgrade warnings to errors HOT 2
- round() on ARM Neon uses wrong rounding mode HOT 2
- mul() intrinsic is missing some overloads. HOT 2
- clamp() intrinsic is missing overloads for intN HOT 1
- Some non square matrix definitions are incorrect HOT 6
- Missing matrix constructors HOT 2
- Some vector double functions missing HOT 5
- Undefined behavior when accessing vector elements with operator[] HOT 10
- internal::round_float gives incorrect results HOT 4
- Build failure on G++13.2 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hlslpp.