Posts Tagged ‘C++’



13
Jul

[C++][OpenMP] Parallel Quick Sort, source code

In this post I will give a code of a parallel quick sort.
This sort can be improve because we are in shared memory architecture. But, I build it to create a MPI version (source code also available on the blog). And as said “Introduction to Parallel Computing” (A.G. A.G. G.K. V.K.) I need a thread version before a MPI one.

Another (an little faster version) is available here. This second version use a completely different algorithm!!!

PS : I developed several quick sort (available on this blog), a sequential version, an openmp tasks version, a openmp not inplace version, an mpi version and a Qt concurent version.

Click to continue…

29
Apr

[Openmp] for schedule static or dynamic

Of course there is a difference between static and dynamic scheduling (every one know that) but if you want to see how it can make a difference look at the example above.

 

Click to continue…

8
Mar

C++ – Unit test – easy, one file, basic, simple

I few weeks ago I wanted to use unit test. But when I was searching for a framework easy to use, fast, that do not need to be installed 10 libs to make it working etc… Well I did not find anything that satisfy me.

So I make my own lib.

Click to continue…

20
Jan

[C/C++] OpenMP vs PThread – openmp or posix thread ?

A popular question. Which one to use, which one is faster. Well, I do not really know but this post may help you to make your choice.

Click to continue…

6
Dec

C++ – OpenMP – std::cout – Print with OpenMP

In this post I propose a simple class to print using cout in a program that uses OpenMP.
Of course you can use a mutex to protect the cout stream, but I prefer to use a buffer before printing as I show in this example.

Click to continue…

2
Dec

C++ – OpenMP – Sum reduction example (simple example)

Here is an example of a reduction on a variable to sum the result from each thread.
Click to continue…

29
Nov

C++ – OpenMP – Private, share, copy, contructor, etc. examples

In this post I show quickly what does your program copy when you are using “share” or “private” clause with openMP.
Click to continue…

22
Nov

C++ – Qt – SingleApplication – Single App Instance

How to create an application that allows only one instance at a time. Here is my solution inspired from : http://www.qtcentre.org/wiki/index.php?title=SingleApplication

Click to continue…

5
Nov

C++ – Tracking/Debuging tools, generate xml from trace

Last post about development for Brainable for a long time. In this post, I present a part of the library used to generate xml report to track program actions.
It consists on basic classes and macro. If you finally do not use the debug class, the macro makes the lib transparent.
Click to continue…

4
Nov

C++ – Custom Hash container, fast & portable

After Vector, List & Array here is the Hash container for Brainable.
Click to continue…

Celadon theme by the Themes Boutique