Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The nice thing about the intrinsics is that they can be passed by value or as a return type. They map nicely to modern vector hardware. Anything done with templates is going to be very generic and will not have these characteristics. But let them continue adding abstractions with funky syntax instead of optimized versions of widely used constructs. ;-)


I don't see why template-based types would be able to be passed by value or returned?

An interesting library is Boost::SIMD (!! not part of Boost !!): https://github.com/NumScale/boost.simd


They're inlines, not intrinsics. Intrinsics would be built into the language. Not a bad idea for basic constructs such as short vectors of floating point numbers, which are very close to the hardware.

I was writing a physics engine at the time, and it was a huge hassle that this wasn't standardized in C++. I used three libraries which each had their own definition of short vectors. Way too much conversion.

Matlab has one notation for arrays and matrices. So all Matlib libraries are compatible at the array and matrix level. This is one reason that much number-crunching is done in Matlab.

Rust already has at least three libraries for short vectors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: