"best" array container for Intel performance products? valarray, C-array, Boost.Array,Multi-Array, Blitz++, or etc?

"best" array container for Intel performance products? valarray, C-array, Boost.Array,Multi-Array, Blitz++, or etc?


My industry is in real-time scientific computing. We are looking for an industry-standard high-performance 1D/2D/ND container that will work "best" with Intel Compiler + Intel Performance lib products.

Does ICC have its compiler-specific array container class?

If not, suitable containers that came to my mind are: valarray, Boost.Array, Boost.Multi-Array, Blitz++, MTL, etc.

Our application works with 1D array, and 2D array (matrix) all the time, using both the MKL,IPP, as well as our own custom C functions. Note that our core software is heavily multi-threaded using the Master-Worker pattern, which we hope to try using TBB soon.

Currently all of our arrays (even 2D) are C-style array. While it's good for performance, we start to realize the benefits of using standard array container (such as vector, and valarray) since they do bound-checking (turning this off in release mode for max performance), and has size() so that we dont have to always carry around an extra int to hold the number of elements.

What is the "best" container? We have also explored Blitz++, Boost, etc, but we have no clue if ICC would be "smart" enough to do full optimization on those libraries.

How do people in the HPC community solve this problem? We just want to pick one and stick with it.

I also recently noted one of the new (?) ICC features:

  • Improved valarray option

Templates of array operations that enable low level hardware features to enhance application performance. No source code change required to use!

Does this mean valarray is the "best" array container to be used with ICC and Intel Performance libs? I honestly prefer using something else like Blitz++ or Boost rather than valarray just because I think valarray isnt too well-designed (the one that bothers me the most is the slice operation that doesnt allow you to make direct modifications to the original array it was sliced from!)

Anyone who has thought through this problem, and knows the solution to this, please comment!

1 contribution / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.