This document discusses parallel processing and techniques for parallelizing serial code, including threading, automatic parallelization, OpenMP, and vectorization. It provides examples of parallel programming models like shared memory, message passing with MPI, and task-based parallelism. Automatic parallelization identifies loops that can be parallelized safely. OpenMP is described as a programming model for shared-memory parallelism in C/C++ and Fortran using compiler directives. Vectorization using SIMD instructions is also covered.
It is the presentation file used by Jim Huang (jserv) at OSDC.tw 2009. New compiler technologies are invisible but highly integrated around our world, and we can enrich the experience via facilitating LLVM.
It is the presentation file used by Jim Huang (jserv) at OSDC.tw 2009. New compiler technologies are invisible but highly integrated around our world, and we can enrich the experience via facilitating LLVM.
Describes about Eco Style, the first IT system in the world to help decrease the amount of Co2 comming out from a company. Built by Beat Communication.
14. OpenMP の例
#pragma omp parallel for
parallel loop
for (int i=0; i<m; i++)
j
{
double sum = 0.0;
for (int j=0; j<n; j++)
i =
sum += b[i][j]*c[j]; *
a[i] = sum;
}
スレッド0 スレッド1
for (i=0,1,2,3,4) for (i=5,6,7,8,9)
i=0 i=5
sum = Σ b[i=0][j]*c[j] sum = Σ b[i=5][j]*c[j]
a[0] = sum a[5] = sum
i=1 i=6