Click here to Skip to main content
15,886,724 members
Home / Discussions / C#
   

C#

 
Questionimage processing Pin
Bishwajit Nepali5-Dec-12 19:52
Bishwajit Nepali5-Dec-12 19:52 
AnswerRe: image processing Pin
Richard MacCutchan5-Dec-12 21:34
mveRichard MacCutchan5-Dec-12 21:34 
AnswerRe: image processing Pin
lukeer5-Dec-12 23:45
lukeer5-Dec-12 23:45 
QuestionHow to read data from crl file in C# Pin
Gramulos5-Dec-12 19:12
Gramulos5-Dec-12 19:12 
AnswerRe: How to read data from crl file in C# Pin
Richard MacCutchan5-Dec-12 21:32
mveRichard MacCutchan5-Dec-12 21:32 
AnswerRe: How to read data from crl file in C# Pin
Eddy Vluggen6-Dec-12 2:34
professionalEddy Vluggen6-Dec-12 2:34 
QuestionMultiThreading Pin
MAW305-Dec-12 17:49
MAW305-Dec-12 17:49 
AnswerRe: MultiThreading Pin
Dave Kreskowiak5-Dec-12 18:28
mveDave Kreskowiak5-Dec-12 18:28 
The benefit you get depends on your datasets and how they need to be processed. You have a couple of options for dividing the work up:

1) Each thread will handle its own dataset, processing each, by itself, from start to finish. The benefit you get is if you have more than one dataset being worked on at a time.

2) If your dataset can be worked on if you partition a dataset into smaller chunks, each thread can work on a small chunk of the data. Say your dataset has 100 items in it and each can be processed individually with no dependancies on the other items in the set. Partitioning the dataset means breaking the 100 items into groups of, say, 25 each. Then 4 threads could work on the same dataset, each processing 25 items seperate from the others.

In both cases, you're best benefit is usually obtained when the number of worker threads you create matches the number of cores in the CPU. So, if you have an Intel proc with 4 cores and 4 hyperthreads, you'll see 8 logical cores, so you can get away with 8 threads.

You can also look into the Task Parallel Library (pre .NET 4.0) to simplify this process greatly. If using .NET 4.0 or 4.5, the TPL is integrated into the .NET Framework. You don't have to install a seperate library to use it.

See the System.Threading.Tasks namespace documentation.

GeneralRe: MultiThreading Pin
MAW305-Dec-12 18:40
MAW305-Dec-12 18:40 
GeneralRe: MultiThreading Pin
Dave Kreskowiak6-Dec-12 1:45
mveDave Kreskowiak6-Dec-12 1:45 
Questionimage processing Pin
Bishwajit Nepali5-Dec-12 17:37
Bishwajit Nepali5-Dec-12 17:37 
AnswerRe: image processing Pin
Dave Kreskowiak5-Dec-12 18:17
mveDave Kreskowiak5-Dec-12 18:17 
AnswerRe: image processing Pin
Mycroft Holmes5-Dec-12 18:35
professionalMycroft Holmes5-Dec-12 18:35 
GeneralRe: image processing Pin
Adam R Harris6-Dec-12 9:13
Adam R Harris6-Dec-12 9:13 
GeneralRe: image processing Pin
Mycroft Holmes6-Dec-12 11:58
professionalMycroft Holmes6-Dec-12 11:58 
QuestionC# make executabloe a dll Pin
sc steinhayse5-Dec-12 16:43
sc steinhayse5-Dec-12 16:43 
AnswerRe: C# make executabloe a dll Pin
Abhinav S5-Dec-12 17:04
Abhinav S5-Dec-12 17:04 
AnswerRe: C# make executabloe a dll Pin
PIEBALDconsult5-Dec-12 18:08
mvePIEBALDconsult5-Dec-12 18:08 
GeneralRe: C# make executabloe a dll Pin
sc steinhayse6-Dec-12 7:22
sc steinhayse6-Dec-12 7:22 
GeneralRe: C# make executabloe a dll Pin
PIEBALDconsult6-Dec-12 8:05
mvePIEBALDconsult6-Dec-12 8:05 
AnswerRe: C# make executabloe a dll Pin
Mycroft Holmes5-Dec-12 18:31
professionalMycroft Holmes5-Dec-12 18:31 
AnswerRe: C# make executabloe a dll Pin
Pete O'Hanlon6-Dec-12 7:47
mvePete O'Hanlon6-Dec-12 7:47 
Questionhelp me Pin
siawash_s5-Dec-12 11:44
siawash_s5-Dec-12 11:44 
AnswerRe: help me Pin
Richard MacCutchan5-Dec-12 12:17
mveRichard MacCutchan5-Dec-12 12:17 
GeneralRe: help me Pin
Paul Conrad5-Dec-12 12:36
professionalPaul Conrad5-Dec-12 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.