17 questions
-5
votes
1
answer
207
views
How do I get my existing MSVC project to compile with the Visual Studio 2022 Clang compiler?
I have an existing c++ project that compiles fine with msvc, and I'm trying to get it to compile in Visual Studio 2022 with LLVM (clang-cl). At the moment I'm using C++ Language Standard Preview ISO C+...
28
votes
1
answer
2k
views
Why performance for this index-of-max function over many arrays of 256 bytes is so slow on Intel i3-N305 compared to AMD Ryzen 7 3800X?
I've run the same binaries compiled with gcc-13 (https://godbolt.org/z/qq5WrE8qx) on Intel i3-N305 3.8GHz and AMD Ryzen 7 3800X 3.9GHz PCs. This code uses VCL library (https://github.com/vectorclass/...
3
votes
1
answer
1k
views
Looking for an efficient function to find an index of max element in SIMD vector using a library
There are similar older questions, but they are using intrinsics and old instruction sets. I have a function f written with C++ vector class library (https://www.agner.org/optimize/#vectorclass):
int ...
1
vote
0
answers
351
views
I used Agner Fog's vector class but met a serious performance reduction problem when the code was compiled by MSVC
I tried to test original SSE/AVX functions compared with Agner Fog's vector class(My CPU supports both SSE and AVX instructions). Everything was in line with forecast on GNU compiler. Then I switched ...
1
vote
1
answer
101
views
How to use VCL as a separate namespace?
My goal is to separate all vectorclass-library typenames to a separate namespace, so that vcl::Vec4i will compile, but Vec4i won't. I tried to use example from manual, however it's not working.
Failed ...
0
votes
3
answers
231
views
How to gather arbitrary indexes in VCL with AVX2 enabled
I want to vectorize following code using gather instructions in VCL. Some operations should be performed on the indexes of vSource defined by other vector VInd:
vector<int> vSource;
vector<...
2
votes
2
answers
480
views
How to use Vector Class Library for AVX vectorization together with the openmp #pragma omp parallel for reduction?
I'm using OpenMP to parallelize the loop, that is internally using AVX-512 with Agner Fog's VCL Vector Class Library.
Here is the code:
double HarmonicSeries(const unsigned long long int N) {
...
1
vote
0
answers
143
views
AVX2/VCL : static/dynamic lane scheduling
I have been trying to speed up a binary tree evaluation algo using AVX2. Actually, I'm using Agner's VCL lib since the difference between hand-coding the algo and using vcl was small for big gain in ...
1
vote
0
answers
117
views
Can't get vectorclass library to compile to AVX2 instructions in MSVC2019
I have tried my best to get the vectorclass library to generate AVX2 instructions, but can't get it to.
I'm using MSVC2019. Here are the compile options:
/permissive- /ifcOutput "x64\Release"...
0
votes
0
answers
139
views
Vector class library: solivng a problem while using vec4d
here a piece of simplified code that causes me a problem/error (Vec4d is coming from the Agner Fog library VCL)
#define AVX256_ALIGNED_MALLOC(type,size) (type *)_aligned_malloc(size * sizeof(type),32)...
4
votes
2
answers
7k
views
How to compile a project which requires SSE2 on MacBook with M1 chip?
I need to install a software which requires SSE2 on my macbook air with M1 chip (os Monterey).
When I am trying to compile the project I receive the following error:
/libRootFftwWrapper/vectorclass/...
0
votes
0
answers
500
views
Vector resize function not working properly c++
I have been making a custom vector class, however I have been bumping into a problem. The problem being that my vector just won't resize, the size stays 0.
Anyone know what the problem is?
Thanks in ...
-1
votes
2
answers
735
views
Does anyone know of a fix for an MSVC compiler bug/annoyance where SIMD Extension settings get "stuck" on AVX?
Does anyone know of a fix for an MSVC compiler bug/annoyance where SIMD Extension settings get "stuck" on AVX?
The context of this question is coding up SIMD CPU dispatchers, closely ...
1
vote
1
answer
452
views
Are there any real benefits to compiling a 32-bit version of my DLL with AVX or higher?
I have a legacy Windows DLL (written in c++) for which I need to maintain a 32-bit version, along with the 64-bit version. I'm updating the heavy math code with simd using Agner's vector class library,...
2
votes
3
answers
978
views
Is it good or bad (performance-wise) to use std::vector<Vec8d>
I am using Agner Fog's vectorclass library to use SIMD instructions (AVX specifically) in my application. Since it is best to use struct-of-array datastructures for easily employing SIMD, I quite ...
1
vote
3
answers
2k
views
Vector class library for processing speed
I am looking at parallel processing algorithm for processing speed improvement.
I want to test Agner Fog's vector class library, VCL.
I am wondering how to select different vector classes for example ...
6
votes
3
answers
810
views
Compile multi-architecture code using Agner's Vector Class Library
How can I create a library that will dynamically switch between SSE, AVX, and AVX2 code paths depending on the host processor/OS? I am using Agner Fog's VCL (Vector Class Library) and compiling with ...