When using simd_inverse functions, the same input yields different results on different devices.
On the Mac mini with M4 pro and M3 ultra, the result is
But on the Mac mini of M2 ultra, the result is
simd
RSS for tagsimd provides types and functions for small vector and matrix computations.
Posts under simd tag
7 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am developing a macOS terminal app, running on an M4 Pro, and using Metal.
I am not able use float8 or float16, both reporting Variable has incomplete type 'float16' (aka '__Reserved_Name__Do_not_use_float16').
Based on the system I should be able to use these. Either it is because it is also compiling to Intel, which they are not allowed, or something else. Either way I have not been able to figure out how to get past this.
IIs there a compiler setting I need to set to make this work? if so which one and what setting do I need? I only want to run this on M processes, on the latest version of OS so not interested in Intel version or backward compatibility.
Hi,
I am curious about if hyperthreading is enabled/disabled on my macbook pro M1 or M4. Howto figure out?
I am using macOS 15.5.
Further, I develop a multi-threaded audio sequencer that creates threads per instrument. I use vector operations to increase performance.
I recognized lowering synchronization rate from 250 Hz to 60 Hz gives additional performance advantages.
Howto programmatically check if Hyperthreading is enabled/disabled and howto enable/disable it programmatically?
After some research I found sysctl() and nvram SMTDisable=%01.
https://support.apple.com/en-us/101870
Can anyone provide me an Objective C example?
regards, Joël
hi,
Is it possible to compare two vectors and get a boolean answer?
example :
uint642_t a;
uint642_t b;
.../...
if(a == b)
.../...
how to do it ?
thank
hi
Question is in the title.. do we already know the length of the vectors?
best regards
I'm encountering an issue when trying to store a SIMD3<Float> in a SwiftData model. Since SIMD3<Float> already conforms to Codable, I expected it to work. However, attempting to store a single SIMD3<Float> crashes with the following error:
Fatal error: Unexpected property within Persisted Struct/Enum: Builtin.Vec4xFPIEEE32
Interestingly, storing an array of vectors, [SIMD3<Float>], works perfectly fine. The issue only arises when trying to store a single SIMD3<Float>.
I’m not looking for a workaround (I can break the vector into individual floats in a custom codable struct to get by) , but I’d like to understand why storing a codable SIMD3<Float> in SwiftData results in this crash. Is this a limitation of SwiftData, or is there something I’m missing about how vectors are handled?
Any insights would be greatly appreciated!
I searched the Metal Shading Language Specification Version 3.0 document, however I cannot see any function for inverting a matrix. Is there really no function in Metal for inverting a matrix?
I often need to this in linear equations and have so far resorted to writing the necessary function each time, most of the time just copy-and-pasting code.
inverse exists in SIMD and GLSL, so why not in Metal? It seems so unexpected that this function does not exist that I am almost certain I have just overlooked something obvious. I even tried 1 / M, to no avail.