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.

135 questions
0
votes
1 answer

Howto use ppl tasks and .then in a loop?

Im trying to learn ppl. Instead of using threads. Lets take it from the beginning. I have this simple problem: v1: while(true) { auto important_msg = ReceiveImportantMessage_Blocking(); //Blocks for about 20s…
petke
  • 1,027
  • 7
  • 20
0
votes
1 answer

Windows 10 Sockets and MS PPL. TCP connection between server and client breaks after few seconds

My system: Server: Windows 10 Pro 1511 10586.36 Microsoft Visual Studio 2015 Community 14.0.24720.00 Update 1 Client: Windows 10 IoT Core (build 10586) Raspberry Pi 2. My error: Connection establishes successfully, but being lost after a few…
Elia
  • 33
  • 7
0
votes
1 answer

Find max element in array using PPL

I need to implement a function that would find the largest element in the array of floats using ppl.h. I have this code, based on this answer: float find_largest_element_in_matrix_PPL(float* m, size_t dims) { float max_element; int row,…
Denis Yakovenko
  • 2,398
  • 3
  • 38
  • 70
0
votes
0 answers

Compilation fails when using std::bind with Concurrency::parallel_for

Came across a strange compilation error while migrating some old code, which made use of the boost library, to C++11. Specifically, using Visual Studio 2013 Professional Update 5. The following example code fails to compile with error C3848. …
0
votes
2 answers

Passing a parameter to a task in ppl

I'm just beginning to learn ppl in Visual Studio and I began learning about tasks. So far so good, and for example I do understand the basics. But how can I create task that receives an argument? That is, it is fairly straightforward to create task…
Artur
  • 181
  • 1
  • 9
0
votes
1 answer

Class object inside or outside a parallel_for / parallel_for_each?

I have been studying about parallel loops (C++11) and testing them with MS visual studio 2013. I am clear about them (lambdas esp.) which are pretty cool. But my concern is that I have to call a function that performs a simple euclidean distance…
Wajih
  • 714
  • 3
  • 10
  • 29
0
votes
2 answers

SIMD alignment issue with PPL Combinable

I'm trying to sum the elements of array in parallel with SIMD. To avoid locking I'm using combinable thread local which is not always aligned on 16 bytes because of that _mm_add_epi32 is throwing exception concurrency::combinable<__m128i>…
vito
  • 317
  • 4
  • 15
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
  • 1,910
  • 1
  • 15
  • 23
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
  • 327
  • 2
  • 3
  • 16
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
  • 231
  • 3
  • 12
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
  • 545
  • 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,011
  • 3
  • 16
  • 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
  • 18,012
  • 11
  • 66
  • 122
1 2 3
8
9