HyperspaceExplorer 0.7.1
Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Multithreading::Private::Kernel< RandomAccessContainer, Function > Class Template Reference

Does the work of running a function concurrently on a random access container. More...

#include <MultithreadingPrivate.h>

List of all members.

Static Public Member Functions

static std::vector< Kernel * > generateKernels (const RandomAccessContainer &container, RandomAccessContainer &output, Function function, unsigned tasks_per_processor)
static void startTasks (const std::vector< Kernel * > &tasks)
static void waitForTasks (const std::vector< Kernel * > &tasks)

Protected Member Functions

void run ()

Private Member Functions

 Kernel (const RandomAccessContainer &container, unsigned index_start, unsigned index_end, Function function, RandomAccessContainer &output)

Private Attributes

const RandomAccessContainer & container_
unsigned index_start_
unsigned index_end_
Function function_
RandomAccessContainer & output_

Detailed Description

template<class RandomAccessContainer, typename Function>
class Multithreading::Private::Kernel< RandomAccessContainer, Function >

Does the work of running a function concurrently on a random access container.

Template Parameters:
RandomAccessContainerType of the container on which the operation is run. Must support operator[]().
FunctionType of the operation that is run on every element of the container. Either a function with the signature
 T function(const T &argument) 
or a functor class whose operator()() has that signature.
Todo:

Adapt to the "correct" version of using QThread; see http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/ and http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

possibility to transparently use different backends (QThread and std::thread)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo