Questions tagged [sse]

Streaming SIMD Extensions (SSE) is the first generation of SIMD Intel's instruction sets available on modern x86-compatible CPUs. SSE offers single-precision floating point arithmetic and integer arithmetic (excluding division) and logical operations on packed or single operands of sizes from 8 to 64 bits.

Filter by
Sorted by
Tagged with
4
votes
0answers
59 views

4×4 cofactor in SSE

The cofactor of a 4×4 matrix can be used to convert a "regular geometry" matrix into the matrix that transforms the normals. It's an alternative to the common inverse-transpose pattern. In this post I ...
3
votes
1answer
63 views

Generic pixel class to seamlessly alpha-blend and convert between different pixel structure layouts

Does what it says in the title. I just finished this and wanted to share with someone. Looking for possible optimizations, bugs (most of it is tested to work) or any constructive criticism. ...
4
votes
0answers
144 views

Fast Hardy-Weinberg equilibrium simulation

I was very bored over one of my breaks this year, so I built a Hardy-Weinberg equilibrium simulator for two unrelated alleles of the same gene. Hardy-Weinberg equilibrium is when there is no evolution,...
6
votes
1answer
394 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 ...
1
vote
1answer
355 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
3answers
822 views

Converting Array of Floats to UINT8 (`char`) or UINT16 (`unsigned short`) Using SSE4

The problem is given image in 32 Bit Floating Point Format (float) how to convert it to UINT8 (char) or UNIT16 (...
0
votes
1answer
296 views

Finding the Minimum and Maximum Value in an Image

Given an image which is padded to support aligning (SSE) I need to find its minimum and maximum value as fast as possible. Mind you the padded values are not defined and can't be assumed to have ...
6
votes
2answers
3k 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 ...
9
votes
2answers
709 views

Vectorized and Multi Threaded Image Convolution

I created code for Image Convolution. The code is in my Image Convolution GitHub Repository. It includes the case for arbitrary Image Convolution and for Separable Kernel Convolution. The code is a ...
10
votes
3answers
358 views

SSE loop to walk likely primes

This is a continuation of a discussion that was started here. While there are some interesting points there about instruction timing and latency, it is not necessary to read that Question to ...
1
vote
0answers
325 views

MD5 implementation with SSE2

My implementation of MD5 (hash function) works correctly, though it has terrible performance. As a laboratory work, I must write the algorithm myself and implement the brute force. full code with ...
5
votes
0answers
199 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
1answer
249 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 ...
4
votes
0answers
114 views

Parallel popcount of packed bytes

I want to do a popcount of bytes in an array. Not a total popcount of everything, but lots of little popcounts for every individual byte to determine the neighborhood count in GoL. The following ...
6
votes
1answer
5k views

Optimizing bilinear interpolation

I have spent countless hours trying to speed up my bilinear interpolation up. I even tried implementing an SSE version (a double version and a float version), but that was even slower than this ...
3
votes
0answers
568 views

Grayscale bilinear patch extraction - SSE optimization

My program makes an intensive use of small sub-images extracted using bilinear interpolation from larger grayscale images (some call this problem subpixel translation). I am using the following C++ ...
6
votes
1answer
413 views

Optimizing multiplication of square matrices for full CPU utilization

Problem I am learning about HPC and code optimization. I attempt to replicate the results in Goto's seminal matrix multiplication paper. Despite my best efforts, I cannot get over ~50% maximum ...
4
votes
0answers
202 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 ...
8
votes
1answer
567 views

Optimizing multiplication of two polynomials in GF(2^32)

I have the following method for multiplying two polynomials in GF(232): ...
4
votes
2answers
908 views

Is this C++ program correctly implemented in SSE?

I have to implement a simple program in SSE, and I don't know if I have done it in the right way (it's my first program in SSE). This is the C++ program: ...
1
vote
1answer
2k views

SSE Intrinsics Gaussian Blur Approximation

The following is the current iteration of a gaussian blur approximation code I am using. A typical naive convolution operation is O(N*M), where N is the number of ...
3
votes
1answer
691 views

Trying to improve and better understand Intel SSE intrinsics

I've been writing a collection of signal processing function optimized with SSE intrinsics (mostly for audio processing). Here is a linear interpolation function I wrote. It works well and is quite ...
7
votes
1answer
447 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 ...
4
votes
1answer
2k views

SSE2 assembly optimization - multiply unsigned shorts and add the result

I am attempting to optimize a piece of C code which aims to multiply a series of pairs of unsigned shorts and add the result. I am only concerned about the high 16 bits of the result, and I can ...
36
votes
9answers
12k views

Copying 80 bytes as fast as possible

I am running a math-oriented computation that spends a significant amount of its time doing memcpy, always copying 80 bytes from one location to the next, an array ...