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
0
votes
1 answer

Set priority of PPL thread groups

I have a scenario where some functions need to complete as quickly as possible and be given computation resources at the expense of other tasks (i.e. they are high-priority). Specifically, graphics rendering, and any tasks that are spawned for…
Joe
  • 2,008
  • 1
  • 17
  • 25
0
votes
1 answer

Are shared pointers necessary in continuation chains?

I have a continuation chain using lambda expressions where one task assigns to a variable and the next task reads from that variable. Microsoft suggests using a shared_ptr to wrap the variable even when the variable is a reference-counted handle…
0
votes
1 answer

How to parallelize "while" loop by the using of PPL

I need to parallelize "while" loop by the means of PPL. I have the following code in Visual C++ in MS VS 2013. int WordCount::CountWordsInTextFiles(basic_string p_FolderPath, vector>& p_TextFilesNames) { // Word counter…
user3769902
  • 415
  • 2
  • 5
  • 20
0
votes
1 answer

BitmapImage SetSourceAsync in WinRT c++

I am new to WinRT c++. I am trying to pass an StorageFile image from C# and open the file and set it as source in BitmapImage in WinRT to extract height and width of image. I am using the following code. auto openOperation =…
croc
  • 241
  • 1
  • 4
  • 13
0
votes
1 answer

Using PPL with an operator new override

I have a large (million line) VC++ project, and would like to start using PPL (Parallel Patterns Library) within the project. The project implements a custom global operator new and operator delete functions. The problem is that PPL (in a debug…
0
votes
1 answer

Concurrency::critical_section build error: cannot access private member

I can't build below code(vs2013) blocks and getting error "error C2248: 'Concurrency::critical_section::critical_section' : cannot access private member declared in class 'Concurrency::critical_section'" Anyone can help explain why this is…
Xin
  • 575
  • 4
  • 20
0
votes
1 answer

C++/CX Metro Windows - create_task implementation prevents using variable not defined in that scope

I am trying to define Uri^ outside of the implementation of create_task. In java, if you have an asynchronous task adding the final modifier would allow you to use that variable (with final modifier) inside the asynchronous code. How can I use Uri^…
user812954
  • 3,951
  • 3
  • 19
  • 18
0
votes
0 answers

Parallel execution of http_client requests in PPL Casablanca?

Background: I have a simple C++11 application that uses wxWidgets wxListView to display customer with their street address. The goal is to get the GPS coordinates from the address (geocoding) via web service that implements the service. I am able to…
pepr
  • 20,112
  • 15
  • 76
  • 139
0
votes
1 answer

Passing reference as task data - same values when task is run

Today, I'm trying to make a task manager for a personnal project. I wrote the following method : template void ThreadManager::AddTaskToRun(Callback&& fun, Args&&... args) { task_handle> task =…
Veler
  • 161
  • 2
  • 13
0
votes
1 answer

Are results of concurrency::when_all's return vector FIFO?

Concurrency::when_all function returns a std::vector with the return values of all tasks it awaited. Are the values in the vector in any sort of order, or are they in the order in which the tasks completed?
David Božjak
  • 16,887
  • 18
  • 67
  • 98
0
votes
1 answer

Periodic task with ConcRT

I am writing a C++ application that, among other duties, periodically (once in hour) makes requests to server. This scheduled task can be interrupted and forced to execute earlier (when application receives new user data). I've decided to use…
Andrew S
  • 23
  • 5
0
votes
1 answer

Chain the completion of an async function to another

I am working on a Windows Store (C++) app. This is a method that reads from the database using the web service. task Ternet::GetFromDB(cancellation_token cancellationToken) { uriString = ref new…
Furqan Khan
  • 504
  • 4
  • 12
0
votes
2 answers

Unexpected output from parallel_invoke in C++

I have put 3 tasks in parallel: print min, max, and average of two numbers. The first task prints min value twice, and I expect it's output to be contiguous. int wmain() { __int64 elapsed; elapsed = time_call([&] { double a =…
0
votes
2 answers

concurrent_vector is not working inside parallel_for ( PPL )

there is a sample working code below ( parallel_for using Parallel Pattern Library ( ppl ) ). The main problem in here is sqr < concurrent_vector > stored values changing in every execution, but it should not be! I used < concurrent_vector > for…
user2055437
  • 67
  • 1
  • 13
0
votes
1 answer

C++ Parallel Loop without locking critical section using PPL

in the below code, there is parallel_for loop implemented with PPL. The main problem is here; abc vector values is not correct when i was commented cs.lock() and cs.unlock(). I am using concurrency_vector type for randomly access array values but…
user2055437
  • 67
  • 1
  • 13
1 2 3
9
10