Boost logo

Boost :

Subject: Re: [boost] cache size runtime detection
From: Andy Thomason (a.thomason_at_[hidden])
Date: 2015-08-19 19:15:40

I would love to see a comprehensive SIMD library similar to
those on game consoles.

> namespace boost::sys_info::cpu {
> enum class feature_tag
> {
> // Arch-specific values
> sse, sse2...
> _count
> };

Do not forget the CPUID support for lzcnt and popcnt, the two most
important instruction classes in searching - especially genetics.

It is worth noting that there is some good idiom support and generic
vector support in Clang, GCC and SNC (playstation) which makes it easy
to write SSE and NEON code without using intrinsics.


vector float a, b, c;
float d;

// lane based ops.
c = a + b;

// permutes
a = (vector float){ a[0], a[1], b[2], b[3] };

// scalar ops
c = a * d;

// vector/scalar combinations
c = a * b[0];

Loop vectorisation is another method of writing vector code
provided __restrict is used liberally.

// should resolve to one instruction.
for (int i = 0; i != 4; ++i) {
   c[i] = a[i] * b[i];


This email has been checked for viruses by Avast antivirus software.

Boost list run by bdawes at, gregod at, cpdaniel at, john at