python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
In C++, is it defined behavior to initialize plain arrays with their own first few elements (that are initialized from outer source)?
In an auto-vectorized array initialization,
alignas(64)
const float a[16]={
b[i+0],b[i+1],b[i+2],b[i+3], // normal initialization
// self-referencing for duplicated data
a[0],a[1],a[2],a[...
huseyin tugrul buyukisik
Votes: 0
Answers: 0
Loop vectorization - counting matches of 7-byte records with masking
I have a fairly simple loop:
auto indexRecord = getRowPointer(0);
bool equals;
// recordCount is about 6 000 000
for (int i = 0; i < recordCount; ++i) {
equals = BitString::equals(SelectMask, i...

Lukáš Moravec
Votes: 0
Answers: 3
Auto-vectorization for hand-unrolled initialized tiled-computation versus simple loop with no initialization
In optimization for an AABB collision detection algorithm's inner-most 4-versus-4 comparison part, I am stuck at simplifying code at the same time gaining(or just retaining) performance.
Here is the v...
huseyin tugrul buyukisik
Votes: 0
Answers: 0
Does C++ support run-time query for natural width of SIMD units of a core?
In C++, is there a way to query number of lanes of SIMD units like this:
// 4 for bulldozer,
// 8 for skylake,
// 16 for cascadelake
int width = std::this_thread::SIMD_WIDTH;
or does it have to be...
huseyin tugrul buyukisik
Votes: 0
Answers: 0