Questions tagged [ppl]

The Parallel Patterns Library (PPL) is a C++ library included with Microsoft Visual C++ 2010+ that provides an imperative programming model that promotes scalability and ease-of-use for developing concurrent applications.

The Parallel Patterns Library (PPL) is a C++ library included with Microsoft Visual C++ 2010+ that provides an imperative programming model that promotes scalability and ease-of-use for developing concurrent applications.

142 questions
1
vote
1 answer

PPL - license and link information

I would like to use PPL with compiler VS2010. what is license status for PPL? can it be freely used in commercial software, and can you point at the relevant doc? How is it bound for appropriate compilation or how does it work? Do I have to download…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
1
vote
1 answer

c++ PPL parallel work - function max() in reduction class 'combinable'

I am using the Parallel Pattern Library. The class combinable plays the role of reduction clause in openMP, and enables to merge results from parallel calculations. Does .combine(max()) exists (btw, could you point at some ref with allowed…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
0
votes
1 answer

PPL task_group schedule work and clean accumulated resources

What I want basically to acomplish is to schedule on a task_group new work items as work becomes available. On the task_group the run() method is called in a producer consummer scenario - such that at any given moment as work is necessary it is…
Ghita
  • 4,465
  • 4
  • 42
  • 69
0
votes
1 answer

vector --> concurrent_vector migration + OpenGL restriction

I need to speed-up some calculation and result of calculation then used to draw OpenGL model. Major speed-up archived when I changed std::vector to Concurrency::concurrent_vector and used parallel_for instead of just for loops. This vector (or…
IgorStack
  • 799
  • 2
  • 6
  • 22
0
votes
1 answer

Is it possible to use parallel_for and concurrent_vector for organizing asynchronous island GA algorithm?

Assume that we have a canonical island genetic algorithm with the ring topology. I use C++,PPL and MS Visual Studio 2010. It is convenient to work with parallel_for from PPL library. What program primitives should I use if the island must get the…
ilya
  • 1,103
  • 14
  • 36
0
votes
0 answers

PPL create_task requires copy constructor

The following fails (https://godbolt.org/z/qzeqW6eeb): #include #include #include #include void third_party_lib_call_that_blocks(std::string message) { std::cout << message << "\n"; …
MHebes
  • 2,290
  • 1
  • 16
  • 29
0
votes
0 answers

Value Semantics in Parallel Programming

What is the advantage of following value semantics while designing parallel programming?
0
votes
1 answer

How the variable capturing in anonymous functions works in Delphi TTask - PPL?

I started to dig into Delphi (D11) PPL and wrote this small example: procedure TForm2.LaunchTasks; const cmax = 5; Var ltask: ITask; i,j: Integer; begin for i := 1 to cmax do begin j := i; ltask := TTask.Create( procedure () …
0
votes
1 answer

concrt.lib missing when compiling with Visual Studo for OneCore

I'm trying to compile my project for Windows Onecore (IOT), with onecoreuap.lib using $(VC_LibraryPath_VC_x64_OneCore) e.g (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\lib\onecore\x64) instead of…
0
votes
1 answer

c++ ppl.h for parallel_for in linux

I made project in windows using c++ and now I am trying to build my project in linux(ubunt). However, I couldn't find ppl.h in linux. I used a lot of parallel_for in my project. What is the replacement can I use?
kangfox
  • 143
  • 1
  • 1
  • 10
0
votes
0 answers

Why does my task continuation never gets executed?

I'm learning to use tasks in C++. I don't understand why my task continuation never gets executed: #include #include using namespace concurrency; const concurrency::task f1() { std::cout << "Inside f1() \n"; …
Lord Riton
  • 25
  • 5
0
votes
1 answer

How to reliably pair a thread to an object instance in a concurrency::parallel_for?

I have a vector of M images that has to be processed in parallel by up to N threads, where N is a parameter set by the user. I also have a vector of N Detector instances that take care of the processing, but each instance must run in its own thread…
GPhilo
  • 18,519
  • 9
  • 63
  • 89
0
votes
1 answer

Delphi PPL Task Priority

I tried to google this, but was not able to find a example . I also tried searching the PPL library itself for Priority, but only found one commented out line about it :) My "problem" is , I have 4 Threads , I run these on a 4 Core CPU . For a brief…
user1937012
  • 1,031
  • 11
  • 20
0
votes
0 answers

PPL. How do i schedule several tasks on same worker thread?

I need to know how i can control on which worker thread Concurrency::task will run. Imagine if i have following code: #include #include #include int main() { std::mutex mtx; Concurrency::create_task([&mtx] …
Alexander
  • 959
  • 5
  • 11
  • 29
0
votes
1 answer

How can I serialize thread execution across a task continuation block?

In the below example, a call to HandleChangesAsync is made from within an asynchronous task, and via an event handler. Question - Is there a way to ensure that only one thread can execute the HandleChangesAsync create_task + task continuation blocks…
Craig
  • 1,890
  • 1
  • 26
  • 44