Recently, I restarted to use GLSL for my graphics applications.
I found one thing that I should not forget about an error of using glGetUniformLocationARB. That is not to try to get attribute locations for variables with no reference since they are discarded. I believe that remembering this will save at least one hour of your time.
Wednesday, October 12, 2011
Sunday, October 2, 2011
OpenCL resources
OpenCL is a standard specification for parallel program using processors (e.g., GPUs and CPUs)
OpenCL SDKs
Videos
Saturday, October 1, 2011
Performance metrics
1. Sources of overhead in parallel programming
interprocess interaction (e.g., communication), idling (load imbalancing and synchronization)
2. Execution time and total parallel overhead
- serial runtime (Ts): the time elapsed between the beginning and the end of its execution.
- parallel runtime (Tp): the time elapsed from the moment a parallel computation starts to the moment the last processing element finishes execution.
- overhead function/total overhead (To) = p * Tp - Ts
(p: the number of processing elements)
Speedup is a measure for the relative performance benefit from a parallel algorithm compared to a sequential algorithm. It is defined as
S = Ts / Tp
Amdahl's law, which is used to find the theoretical maximum speedup, defines the speedup as
S = 1 / ((1-f) + f / p),
where f is the portion of the execution time perfectly parallelizable and p is the number of processing
elements
4. Efficiency (E)
E = S / p = Ts/ (p*Tp)
References
- Grama et al. Introduction to Parallel computing
- Amdahl's Law in the Multicore Era at Google tech talk in 2009
- Amdahl's law in Wikipedia
Subscribe to:
Posts (Atom)