Multicore C++ Standard Template Library in

AbstractNowadays,theoneofthemostimportantchallengesintheprogrammingistheefficientusageofmulticoreprocessors. Manynewprogramminglanguagesandlibrariessupportmulticoreprogramming.Cilk++ is one of the most well-known languages extension of C++ providing new keywords for multicoreprogramming.C++ Standard Template Library is efficient generic library but it does not support parallelism. It isoptimized to the sequential realm, hence it can be an efficiency bottleneck when it is used in multicoreenvironment.In this paper we argue for a multicore implementation of C++ Standard Template Library for Cilk++.Weconsidertheimplementationofcontainers,algorithms,andfunctorsaswell. OurimplementationtakesadvantageofgenerativetechnologiesofC++. Wealsomeasurethespeedupofourimplementation. Keywords: multicoreprogramming,C++,STL,genericprogramming 1 Introduction The recent trend to increase core count in processors has led to a renewed inter-est in the design of both methodologies and mechanisms for the effective parallelprogrammingofsharedmemorycomputerarchitectures. Thosemethodologiesarelargelybasedontraditionalapproachesofparallelcomputing.Usually, low-level approaches supplies the programmers only with primitivesforflows-of-controlmanagement(creation,destruction),theirsynchronizationanddatasharing,whichareusuallyaccomplishedincriticalregionsaccessedinmutualexclusion(mutex). Forinstance,POSIXthreadlibrarycanbeusedtothispurpose.Programming parallel complex applications is this way is certainly hard; tuning

[1]  Matthew H. Austern Generic programming and the STL - using and extending the C++ standard template library , 1999, Addison-Wesley professional computing series.

[2]  Mads Torgersen The expression problem revisited: Four new solutions using generics , 2004 .

[3]  Andrew Lumsdaine,et al.  Integrating semantics and compilation: using c++ concepts to develop robust and efficient reusable libraries , 2008, GPCE '08.

[4]  James Reinders,et al.  Intel® threading building blocks , 2008 .

[5]  Massimo Torquati,et al.  Porting Decision Tree Algorithms to Multicore using FastFlow , 2010, ECML/PKDD.

[6]  Scott Meyers,et al.  Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library , 2001 .

[7]  Sergei Gorlatch,et al.  Generic Parallel Programming Using C++ Templates and Skeletons , 2003, Domain-Specific Program Generation.

[8]  Norbert Pataki,et al.  Measuring the Overhead of C++ Standard Template Library Safe Variants , 2011, Electron. Notes Theor. Comput. Sci..

[9]  Charles E. Leiserson,et al.  The Cilk++ concurrency platform , 2009, 2009 46th ACM/IEEE Design Automation Conference.

[10]  Torquati Massimo,et al.  Efficient streaming applications on multi-core with FastFlow: the biosequence alignment test-bed. , 2009 .

[11]  Peter Sanders,et al.  MCSTL: the multi-core standard template library , 2007, PPOPP.

[12]  Andrei Alexandrescu,et al.  Modern C++ Design , 2001 .

[13]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[14]  L. Dagum,et al.  OpenMP: an industry standard API for shared-memory programming , 1998 .

[15]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[16]  Mitsuhisa Sato,et al.  Parallel Array Class Implementation Using C++ STL Adaptors , 1997, ISCOPE.