Top "Loop-unrolling" questions

Loop unrolling is a loop optimization strategy.

What does #pragma unroll do exactly? Does it affect the number of threads?

I'm new to CUDA, and I can't understand loop unrolling. I've written a piece of code to understand the technique __…

cuda nvidia pragma loop-unrolling
Self-unrolling macro loop in C/C++

I am currently working on a project, where every cycle counts. While profiling my application I discovered that the overhead …

c++ c boost macros loop-unrolling
Alternative to if, else if

I have a lot of if, else if statements and I know there has to be a better way to …

c# performance if-statement dictionary loop-unrolling
How to vectorize my loop with g++?

The introductory links I found while searching: 6.59.14 Loop-Specific Pragmas 2.100 Pragma Loop_Optimize How to give hint to gcc about loop …

c++ optimization g++ vectorization loop-unrolling
Loop unrolling in clang

I am trying to selectively unroll the second loop in the following program: #include <stdio.h> int main() { …

c++ optimization clang llvm-clang loop-unrolling
Java can recognize SIMD advantages of CPU; or there is just optimization effect of loop unrolling

This part of code is from dotproduct method of a vector class of mine. The method does inner product computing …

java performance optimization simd loop-unrolling
GLSL shader not unrolling loop when needed

My 9600GT hates me. Fragment shader: #version 130 uint aa[33] = uint[33]( 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0 ); void main() { int i=0; int a=26; for (i=0; i<…

opengl glsl fragment-shader loop-unrolling