Click here to Skip to main content
15,894,106 members
Everything / Parallel

Parallel

parallel

Great Reads

by Kenneth Haugland
Implementation and theory behind TLM modelling for acoustic wave propagation with 2D and 3D view. Also includes a raindrop and boat wake simulation.
by Sacha Barber
Using the VS2010 Tasks namespace.
by Arthur V. Ratz
This article is a practical guide on using Intel® Threading Building Blocks (TBB) and OpenMP libraries for C++ based on the example of delivering parallel scalable code that implements Burrows-Wheeler Transformation (BWT) algorithm.
by Arman Aşçı
Parallel port data register control with C# .NET 2.0 and inpout32.dll.

Latest Articles

by ToughDev
Emulate parallel port printer to capture data from Tektronix 1230 Logic Analyzer
by PascalLandau
In the fifth part of this tutorial series on developing PHP on Docker we will setup some PHP code quality tools and provide a convenient way to control them via GNU make.
by Ciumac Sergiu
Explains sound fingerprinting algorithm, with a practical example of detecting duplicate files on the user's local drive.
by MehreenTahir
This article is a continuation of Programming Concurrency in C++ Part 1. We will discuss synchronization, future and promises along with async and with that, will sum up the introduction of concurrency in C++.

All Articles

Sort by Updated

Parallel 

10 Apr 2019 by #realJSOP
0) Create a model class that represents your error info (all the properties you want to save). 1) Create a class derived from List to hold the objects as they are created. 2) As the files are processed, and errors are encountered, create a new instance of your ErrorObject model,...
25 Feb 2015 by _Asif_
You can find valuable peice of information from this Disappointing performance with Parallel.For[^]
25 May 2015 by Abhishek Kumar (here to help!!)
Hi,I'm using Parallel.ForEach to read files and then insert processed information into database. There may cases when multiple files my reside similar data and while saving to database, in this scenario I need to updated previous record instead of creating a new...
17 Apr 2016 by Adamanteus
Preserving overheating processor in multitasking environment
4 Mar 2014 by Adarsh Chaurasia - Passionate Trainer
Summary about Parallel Programming in C# 4.0 with comparative study of the PFX (Parallel Programming Framework) technologies with each other
3 Dec 2011 by Addy Tas
Hi,You have tried to parallize a calculation where the result of one iteration is dependent on the previous. If the sum was not used in the multiplication the value would not be transferred to the next iteration. You can only parallize stuff where iterations have no relation to each...
22 Sep 2011 by Adnan Boz
Massively Parallel Random Nunber Generation using CUDA C, Thrust and C#
28 Nov 2011 by Adnan Boz
In this blog post, I’m diving deeper into Thrust usage scenarios with a simple implementation of Monte Carlo Simulation.
11 Nov 2010 by Ajay Vijayvargiya
Learn about parallel algorithms, parallel containers, tasks, task groups, agents library, task scheduler etc in VC10
23 Jan 2018 by akash_waits
Hi All, I am using the below code to Call 5 methods in Parallel and then waiting to received response from all the methods before proceeding further. Task t1 = Task.Factory.StartNew(() => LookUp1(lookUpObj)); //09:28:41.594538 Task t2 =...
8 Jun 2011 by Albert Holguin
Use a mutex variable if you need to control access to a data array from multiple threads.
13 Oct 2012 by Alesiani Marco
A Wave PDE simulation using GPGPU capabilities
19 Oct 2013 by Alexander Golde
Parallel execution in ANKHOR flowsheet
12 Dec 2014 by Alexander Golde
While Moores law is still intact, one can easily observe that there has been a plateau reached at the performance improvements due to an increase in GHz.
2 Dec 2013 by Ali AslRousta
Is there a way to efficiently parallelize nested for loops like:for (int i = 0; i
16 Jan 2012 by alianzalima1978
hi everyone!i'm working with a simple image process program using open mp,but can't get make my program faster as it's supposed to be.the process time of the code bellow was 0.5secs.but with the open mp line commented out, it was only 0.1secs.i can't see what is going on.please...
10 Jun 2017 by Alon Lek
Running tasks in parallel while taking into account the dependencies between them
3 Dec 2018 by Amir Emamjomeh
A study of .NET Parallel Class in solving a system of linear equations using bi-conjugate gradient stabilized method
3 Jul 2010 by Amir Zuker
I've been playing around with the parallel extensions shipped as part of the .NET 4.0 and Visual Studio 2010 RC. Turning immutable atomic self-contained CPU-bound operations to run in parallel is pretty easy. However...
19 Apr 2015 by Amos Chew
I'm using OpenMP to parallelise a couple of for() loops but I'm not sure which "#pragma" command is the right one to use. These situations that I've faced which hopefully possible to parallelise. Really need your help in this.Situation 1 - Is it possible to use "#pragma omp parallel for"...
28 Feb 2013 by Animesh Datta
Hi Everyone...I have a Parallel.Foreach loop by which i load a listview , i have a button for stop the execution.Now my question is , when the execution is going on if i push the button then the process will be stopped .I found some code in net but nothing happens.my code is private...
14 May 2015 by anurag.netdeveloper
Hi All, I have billions of records and i have to do some long calculation on those records. If I am using a sequential for loop then it takes around 7hr to complete that task which is not affordable. To overcome with this, I’m using Parallel.For but the catch is concurrency is occurred in...
15 Aug 2012 by Arman Aşçı
Time division multiplexing between 6 x 7-Segment displays control with Parallel Port and x86 assembly.
17 Aug 2012 by Arman Aşçı
Parallel port data register control with C# .NET 2.0 and inpout32.dll.
24 Apr 2012 by Armando Martínez González
first of all I apologize for my Englishi am trying to optimize/speed up some code i madeto make a texture with the information of the depth frame provided by a kinecti have been looking at System.Threading and other stuff but haven't been able to make this parallel any help would be...
24 Apr 2012 by Armando Martínez González
as of this http://tipsandtricks.runicsoft.com/CSharp/ParallelClass.html[^]i think parallel for wont do what i needbut i think im on to something with this but im not sure yethttp://msdn.microsoft.com/en-us/magazine/cc163340.aspx[^]
25 Apr 2012 by Armando Martínez González
at last i got a hold of something usefullhere maybe this will help another noob like me void Calling_Method_In_Separate_Thread() { ParameterizedThreadStart parameterizedThreadStart = Method; var thread = new Thread(parameterizedThreadStart); ...
31 Oct 2011 by Aron Weiler
Parallel for loop in C#
9 Dec 2016 by Arthur V. Ratz
In this article, we'll demonstrate an approach the allows to increase the performance (up to 600%) of the code that implements the conventional distribution counting algorithm (DCA) using NVIDIA CUDA 8.0 Runtime API
2 May 2017 by Arthur V. Ratz
This article is a practical guide on using Intel® Threading Building Blocks (TBB) and OpenMP libraries for C++ based on the example of delivering parallel scalable code that implements Burrows-Wheeler Transformation (BWT) algorithm.
31 Oct 2018 by Arun Babu Madhavan
Extension method to throttle multiple Tasks in C#
30 Dec 2014 by Babu_Abdulsalam
Various features supporting Concurrency in C++11
8 Jun 2011 by barneyman
don't use global data; it's an anathema to multi-threaded code ...By all means use a data pointer which is created by the master thread and used by the children ....What conflict are you experiencing? reading the data should be fine, however, if you're writing data into anything that's...
25 Nov 2018 by Bartlomiej Filipek
What performance can we get from C++17 parallel algorithms?
4 Oct 2017 by Bhairav Thakkar
A robust framework for complete implementation of Finite Element Analysis in VB.NET
18 Apr 2017 by Bhola Ram Sahu
I want to do a small program that calculates eigen value and eigen vector in parallel processors using MPI. I have written a code that works correctly but its for uni processor. Please help me with some code for parallel processor. I want to compare the processing time for different number of...
7 Sep 2012 by BobJanova
Any problem where there are several computationally expensive and independent tasks that need doing is ripe for parallelism. A Mandelbrot generator or similar could be a good intellectual exercise. In the real world it's usually when you're trying to simulate something with varying parameters,...
22 Nov 2013 by bowlturner
And why can't you just use System.Threading.Thread.Sleep(10000); in the while (!cancellationToken.IsCancellationRequested) Block?As far as how to wait for the GetRssItems you can use the ContinueWith to call a 'finish' or 'next' I have thisprivate void StartTask(long...
7 Sep 2012 by BrianHamilton
Hi,I'm looking for apps to develop to increase me knowledge of parallel programming. I did one with a pivot sort but I'm wondering is something like a primality test would be worth doing or if anyone has any other ideas. I'm not looking for coded solutions, just ideas. I'm not really...
26 Aug 2013 by Buddhi Chaturanga
I want to distinguish of these two technologies relevant to their technological aspects.What are major differences and usage of each one of them?Pros and Cons.How we can handle process through GPU using each one of them?How those technologies can be implemented for 3D game programming?
19 Dec 2012 by CHill60
The performance impact of too many locks defeats the object of multi-threadingSee http://tipsandtricks.runicsoft.com/CSharp/ParallelClass.html[^] for a fuller explanation.
13 Nov 2017 by Chopin2001
The list is like this #typedef CTypedPtrListCOblist; class{ COblist m_oblist; CBobject m_object // have picture object and Drawing() function } I want to use parallel_for_each for drawing Image of m_object. How to use parallel_for_each with ramda function? Mfc Container...
13 Nov 2017 by Chopin2001
I have class and that's like this class mySample { Cobject * cloneNode; std::listcloneList; } and parallel processing as following code. But It only executes when there is only one cbobject. if clonelist have two or more... OnPlay function doesn't work. function...
5 Nov 2017 by Chris Maunder, Henry Gabb
A rambling chat about parallelization, vectorization, Intel® Parallel Studio XE and how sometimes you really need to trust the tools you use.
3 Sep 2012 by Christopher Diggins
An informal survey of implementation techniques of the map higher-order function for arrays in C#.
23 Jun 2020 by Ciumac Sergiu
Explains sound fingerprinting algorithm, with a practical example of detecting duplicate files on the user's local drive.
11 May 2015 by codingrocks
I have developed a .NET windows service which polls for a timer interval and fetches data from the database. Then the application, builds some XML file and sends across the xml files to a web service and receives response. The application uses Parallel.Foreach loop to get parallely process all...
23 Oct 2012 by CPallini
A starting point: "Parallel Programming in .NET Framework 4: Getting Started"[^].
14 Dec 2014 by D Sarthi Maheshwari
A look at possible parallel-producer-consumer patterns (Second Part)
2 May 2014 by DamithSL
to fix "Index was outside the bounds of the array." error, you can use return value of Rows.Add as below int rowindex = dataGridView1.Rows.Add();dataGridView1.Rows[rowindex].HeaderCell.Value = k.ToString();But, This is not a good user case for Parallel.ForEach. you may need to use...
19 Apr 2011 by dan!sh
Following should help:1. Learn Parallel programming.2. Think of an idea for the project (It's your project after all). Still if you are clueless, try Article Writing forum.3. Start working on it.4. Ask specific questions if you are stuck anywhere.Someone giving you ready to use...
19 Oct 2011 by DANAOS_master
Hi folks,we have a dashboard application that presents data according to dynamically executed SQL read from a database.Up to now application connects to the database, loops against the grids (that present data), reads their SQL source, executes the SQL, presents the results in...
30 Jan 2014 by darne hitaro
A php code sent a query to the database say credentials from login page for verifying and something was returned say TRUE OR FALSE as status. Now my question is, if I do not know the code of the developer who wrote the login form, does there exist any way to find out what query is made to the...
3 Jun 2011 by Dave Kreskowiak
Without setting processor affinity, you can't.It's also a bad idea unless you have VERY SPECIFIC reasons for doing so and know the pitsfalls.One such pitfall is that you limit your code to running on single core even if the core is also busy doing other things and other cores are idle. ...
24 Dec 2015 by Dave Kreskowiak
OK, so when do you start writing it? If you came here looking for someone to just hand over completed code to you you've come to the wrong site.
25 Feb 2015 by deepakdynamite
Which loop is faster ???1st Loop (Traditional)List Days = new List(); for (int i = 1; i Days = new...
15 Mar 2012 by Dharmateja Challa
Using parallel_for_each which is part of Parallel Pattern Library ( PPL )
21 Nov 2011 by dmihailescu
UI and concurrent programming using IAsyncResult, BackgroundWorker, TPL, and ‘async’ syntax.
29 Apr 2016 by Dmitriy Gakh
A thought flashed in my mind about a month ago and I am still thinking about it. On one hand, it may seem like a joke, on the other hand, it can have a very serious background. I decided to share it with the community and ask their opinion.Once I faced a memory fault in the platform that...
3 Jul 2015 by DrABELL
Serial and Parallel implementation of efficient Prime Factoriing algorithms
20 May 2011 by E.F. Nijboer
This example is also on the wiki where they use barriers. stdout doesn't have to be thread safe. Have another look at the wiki on this:http://en.wikipedia.org/wiki/OpenMP[^]Good luck!
13 Dec 2011 by E.F. Nijboer
Have a look at the ThreadPool class and TaskScheduler class. And... I think the third link might be a good example of what you are looking...
3 Dec 2011 by Eduard Lu
The reason is,,,, the value of sum was changed from the 1st for loop and used again in the second block of codes. Try using 2 different variables like: sum1 and sum2Regards,Eduard
15 Jun 2012 by enhzflep
Gday, I'm not so sure I understand each of your points and your questions - though I'll do what I can to address them.XBox, PS3 actually only have a couple of cores, like PCs. PS3 - 8 for the cell, 6 as implemented in ps3 variants.Xbox360 - 3 for the PowerPC XenonJust like PCs, the...
8 Jun 2011 by Espen Harlinn
As Niklas Lindquist mentions: If the data is availalbe in memory before the threads start - possibly using a memory mapping - and the data is not altered by the threads. there is no need to protect the memory using a locking mechanism, just access at will. If each thread writes it's results to a...
1 Mar 2013 by essence
Local scope delegates and Lambda expressions allow for some very smart and useful utility functions.
21 Oct 2011 by Ezra Neil
Reading at your question, the first thing that come to my mind is multi-threading. Backgroundworker is threading too but you cannot effectively have more than one threads at a time.Create your own threads and by doing this you can dynamically add more threads as needed. Creating own threads...
14 May 2015 by Frankie-C
You need to isolate thread local data for each concurrent threads.First of all read about TLS Thread Local Storage[^], then figure out how to use them in your project.For samples read this[^], or google for "C# thread local storage example".The Parallel.For Method exist also in a flavour...
25 May 2015 by Frankie-C
More than a punctual solution I would like to expose some points that have to be considered when multithreading is applied.1. Is it really necessary? Trying to parallelize a naturally serial flow of execution is not possible. If your code is so, don't do it!2. Analyze the parts of the...
13 Dec 2011 by Freeboss
Hi, I am looking for a way to set a Fixed concurrent tasks number..As far as i know Task.Factory does not have anything like and i'm stuck.I've also though about the BlockingCollection and the Producer-Consumer model but i'm not sure if this is the right implementation as i have about...
20 May 2011 by fresh_girl
as I was trying to learn openMP , I came across this sample of code #include #include // Include OpenMPint main(int argc, char **argv){#pragma omp parallel num_threads(10) { int threadNum; threadNum = omp_get_thread_num(); printf("This is thread...
13 Sep 2014 by George Jonsson
You can try this code snippet.object padlock = new object();DataTable dtMerge = new DataTable();ParallelLoopResult result = Parallel.For(0, strFilePath.Count, index =>{ Debug.WriteLine("Iteration {0} : {1}", index, strFilePath[index]); clsNewClass objCls = new...
12 Aug 2011 by George Mamaladze
Parallel Programing, PLINQ and Globalization
10 Apr 2019 by Gerry Schmitz
You're going to be "i/o bound"; multiple threads won't help. Since your data is so simple, you could have ONE process; one CSV file; and one "bulk" loader that eliminates the overhead of "building data rows".
9 Apr 2015 by Girish J Jain
In this post, I am going to talk about asynchronous programming in Microsoft .NET Framework in the form of questions and answer.
23 Sep 2014 by Guitar Zero
I have a program that manipulates strings taken from an input file, then writes them to an output file. The files are large, so it takes a long time to run, and it's calculation-bound, not IO-bound. The heart of the process is a For-Next loop that's ripe to be rewritten as a Parallel.For in...
24 Sep 2014 by Guitar Zero
OK, so I figured out what was wrong, but I don't know why. The For-Next loop in the middle of this part was not creating bitstr correctly, so non-unique entries were being made, and those were stripped in a subsequent operation in another, outer loop. outG() was correct, but this concatenation...
21 Aug 2017 by Herman<T>.Instance
I have a project in which a stored procedure is Called on a SQL Server 2014. I fill a DataTable object with the result of the stored procedure. This is call is done in a base class and after the fill it is running a Parallel.ForEach() on the DataTable. In that virtual proces (each entity...
24 Jun 2014 by Hongjun Ge
I have a process function like below, I want to convert it to parallel_for processing, anyone can do it.static void calc(const double b[120], const double x[163970], double y[163970]){ int k, j; memset(&y[0], 0, 163970U * sizeof(double)); for (k = 0; k
28 Jun 2014 by Hongjun Ge
I have a speed test code like below, Use this test the serial process use time is 187ms and parallel use time is 5834ms, why parallel is so slow.#include #include #include using namespace concurrency;using namespace std;void DumpDataToFile(LPCTSTR...
6 Oct 2013 by idle63
Dear allI parallelized a part of my application. From my point of view the problem is predestined to parallelize it: Simply N independent tasks.Not parallelized I observed, that on a quad core my process will consume 25% cpu. My naïve assumption was that if I run e.g. three threads the...
9 Jan 2014 by in.antigate
Hello,We are trying to create simple example of WCF service with multiple parallel calls to the same method of WCF. But we faced with some problems:1. We are calculating time for getting result from WCF service method, and we found that between multiple parallel calls (which are calling WCF...
12 Jan 2014 by in.antigate
Hello!The reason of problem was in that:we didn't set the value for threads in ThreadPool.When we set values using methods ThreadPool.SetMinThreads and ThreadPool.SetMaxThreadsour requests to WCF service are processing parallel. Number of requests which are executed equals number of...
3 Nov 2016 by Intel
The new Intel® Xeon Phi™ processor (code-named Knights Landing, or KNL) is Intel’s first processor to deliver the performance of an accelerator with the benefits you’ve come to expect from a standard CPU
11 Oct 2008 by itaifrenkel
A multi threaded directory size implementation using the CCR
3 Dec 2011 by jackrasha
Why is not The answer same following? Why is not The answer same following? Normal coding :for (long i = 1; i
23 Dec 2013 by Jake Drew
ABSTRACT This article comprises a detailed overview of the various multicore and parallel programming options available within the C# programming language.
19 Mar 2015 by Jake Drew
How to mine webpages in parallel
11 Mar 2014 by Jake Drew
ML methods using bootstrap samples and parallel processing to model very large volumes of data in short periods of time
25 Feb 2013 by Jegan Thiyagesan
Hi,You are trying to access a control in other threads that was created in main thread. The exception you will get from your code is the Cross-thread exception.Try the code below:delegate void SetListviewItemsCallback(ListView.ListViewItemCollection listViewItems);private void...
3 Jun 2011 by jiji2663
helloi want to set a thread or task to one core's of cpu and manage it in c#?of corse whitout Process.GetCurrentProcess().ProcessorAffinity please F1F1F1F1F1F1F1F1 !!!!!!!!!!!thnx
15 Jan 2012 by Jochen Arndt
The inner loop var x is shared by default. You should make it private:#pragma omp parallel for private(x)This should boost performance. But I'm not sure if this is all.
4 Feb 2015 by Jochen Arndt
In this lineMPI_Scatter(p, row *row, MPI_INT,roww, 6, MPI_INT, 0, MPI_COMM_WORLD);you are passing p which is of type int ** while the functions expects an int * parameter.Instead of allocating a two dimensioal array you should allocate an int array with size row * row and access the...
20 Apr 2016 by Jochen Arndt
In your call to MPI_Gather(c + (size/nproc*rank), size*size/nproc, MPI_FLOAT, c + (size/nproc*rank), size*size/nproc, MPI_FLOAT, 0, MPI_COMM_WORLD);the send and receive buffers are identical which is not allowed when not using the MPI_IN_PLACE[^] option.
18 May 2013 by John Michael Hauck
“Programming Massively Parallel Processors (second edition)” by Kirk and Hwu is a very good second book for those interested in getting started with CUDA.
12 Feb 2021 by k5054
Have you checked that your input file is not in DOS format (i.e. ends in a CRLF rather than just an LF)? You can check this using the FILE command: $ file test.txt test.txt: ASCII text, with CRLF line terminators $ If it is in DOS format you...