Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [simd]

Single Instruction, Multiple Data describes CPU instructions that process many operands in parallel.

1
vote
0answers
49 views

No performance gain with SIMD 3D vector for ray tracer

I wrote two versions of vector class for my ray tracer. Non-SIMD version and SIMD version. You can find the code below. I want to ask what things should I keep in mind to get max performance with SIMD....
2
votes
1answer
198 views

SIMD product of a 4×4 matrix and a vector

I wrote a matrix class for use in a ray tracer. I already have a 'scalar' version up and running, but now I'm trying to rewrite it to use Intel SIMD Instrinsics. I realize my compiler (clang-7.0.0) ...
5
votes
1answer
115 views

AVX512 - Add two 512-bit integers using _addcarryx_u64 function

My purpose is to add two __m512i variables (c = a + b) as efficiently as possible. To do so, I'd like to use the _addcarryx_u64 ...
3
votes
1answer
132 views

Optimizations of C Code - Bilateral Filter

I'm working on a nice approximation for the Bilateral Filter. I have a working code which runs pretty fast yet still I think much can be improved. The code (C Code,...
6
votes
1answer
313 views

SIMD memcpy assembler implementation

I am fairly rusty with assembler, let alone the AT&T syntax. I would appreciate it if someone with more experience could please review the following memcpy implementation. Note that this will only ...
2
votes
0answers
33 views

Write 16x16 bitmap to frame buffer

The following code writes a 16x16 bitmap to a framebuffer using up to AVX2 instuctions. I'm sure it can be improved with AVX512 ...
1
vote
1answer
322 views

Fast affine transformations of many 3D points by one 3×4 matrix

I wrote a function to batch-transform 3D vectors by a single 3x4 matrix using SSE2: ...
6
votes
2answers
2k views

AVX SIMD in matrix multiplication

I have coded the following C function for multiplying two NxN matrices and using AVX vectors to speed up the calculation. It works but the speedup is not what is to be expected(some scalar code is ...
1
vote
0answers
64 views

Computing butterflies with better performance

I have a code that computes butterflies and from a little profiling I found out that it is a little bit slow. So, it seemed that the better way to optimize its performance is vectorizing it using ...
0
votes
2answers
503 views

OpenMP SIMD Euclidean Distance

I'm using cv::norm() to compute the L2 distance between row vectors in thousands of dimensions (at least 4096 dimensions). I'm using an AVX2 machine and ...
5
votes
0answers
170 views

Cache conscious SIMD matrix multiply of unsigned integers

The goal of the code review by order of importance (i.e. What I hope to hear from you): I've verified correctness using a straightforward matrix multiply function though I am open to those who want ...
1
vote
2answers
3k views

Hash calculation for array of long values in C#

Can the following function be improved in terms of performance? I am calculating millions of such hashes. The long array represents a record from data table where all values are encoded as long ...
1
vote
1answer
237 views

HPC kernel for DGEMM: compiler v.s. assembly

This is a correct version, for computing a small matrix multiplication: C += A * B, where C is ...
7
votes
2answers
494 views

SSE instruction to check if byte array is zeroes C#

My fundamental problem is how to check whether byte[] is full of zeroes. I posted a range of implementations (with timings) and one clearly beats others. In fact, ...
27
votes
1answer
7k views

SIMD matrix multiplication

I recently started toying with SIMD and came up with the following code for matrix multiplication. First I attempted to implement it using SIMD the same way I did in SISD, just using SIMD for things ...
8
votes
0answers
810 views

Bilinear interpolation using Neon intrinsics

I'm trying to do a Bilinear interpolation on the ARM Neon. However, I find that my vectorized code is slower than the regular one, on a BeagleBone Black. Any idea why this could happen? I'm using ...
4
votes
0answers
200 views

SSE optimisation for audio resampling

I'm learning SSE for the first time and trying to optimise some code. Using oprofile shows that the CPU usage in this function went down from 2.5% to 0.9% using the ...
0
votes
1answer
519 views

Computing tangent space basis vectors for an arbitrary mesh

This is more like a share and a request than a question. I converted Eric Lengyel's code, which calculates tangents of a mesh for the purpose of texturing and normal mapping, to support SIMD. For this ...
7
votes
1answer
438 views

Writing SIMD libraries for C++ on FASM in x86-64 Linux

I have recently started a project of SIMD libraries development for C++ on FASM for x86-64 Linux. I would be glad to hear any opinion or feedback about the project, cleanness of the code and ...