Click here to Skip to main content
15,894,539 members
Home / Discussions / C#
   

C#

 
Questionopen filestream Pin
electriac8-Oct-13 9:47
electriac8-Oct-13 9:47 
AnswerRe: open filestream Pin
Richard MacCutchan8-Oct-13 9:51
mveRichard MacCutchan8-Oct-13 9:51 
GeneralRe: open filestream Pin
electriac8-Oct-13 9:54
electriac8-Oct-13 9:54 
GeneralRe: open filestream Pin
Richard MacCutchan8-Oct-13 9:58
mveRichard MacCutchan8-Oct-13 9:58 
GeneralRe: open filestream Pin
Dave Kreskowiak8-Oct-13 18:50
mveDave Kreskowiak8-Oct-13 18:50 
AnswerRe: open filestream Pin
Eddy Vluggen8-Oct-13 22:33
professionalEddy Vluggen8-Oct-13 22:33 
AnswerRe: open filestream Pin
Richard Deeming9-Oct-13 1:36
mveRichard Deeming9-Oct-13 1:36 
QuestionDetect Hyper-Threaded Cores Pin
Nicolas Légaré8-Oct-13 9:33
Nicolas Légaré8-Oct-13 9:33 
Hi,

I've been playing around with multi-threaded code, setting affinity on different threads, etc... In my particular application, I have noticed performance is actually better when avoiding running threads concurrently on certain processors.

To be more precise, I have an hyper-threaded CPU and when assigning work to both logical processing units inside a core, it takes longer to run. Perhaps my code isn't optimized, but that's besides the point.

So my question is: How can I detect which two (or more, I'd like to be future proof here) logical processing units are from the same core?

I've done some research online and found some information that has lead me to believe CPU0 and CPU1 would be from the same core and CPU2 and CPU3 from the other one, in an hyper-threaded dual core CPU. But my testing is telling me otherwise (CPU0/CPU2 and CPU1/CPU3).

Thanks in advance!
Nic
AnswerRe: Detect Hyper-Threaded Cores Pin
Eddy Vluggen9-Oct-13 0:29
professionalEddy Vluggen9-Oct-13 0:29 
GeneralRe: Detect Hyper-Threaded Cores Pin
Nicolas Légaré9-Oct-13 10:21
Nicolas Légaré9-Oct-13 10:21 
QuestionSimples Snaplines code Pin
Spessotto8-Oct-13 5:05
Spessotto8-Oct-13 5:05 
AnswerRe: Simples Snaplines code Pin
Ron Beyer8-Oct-13 5:52
professionalRon Beyer8-Oct-13 5:52 
GeneralRe: Simples Snaplines code Pin
Spessotto8-Oct-13 6:27
Spessotto8-Oct-13 6:27 
GeneralRe: Simples Snaplines code Pin
Ron Beyer8-Oct-13 7:11
professionalRon Beyer8-Oct-13 7:11 
GeneralRe: Simples Snaplines code Pin
Spessotto8-Oct-13 9:21
Spessotto8-Oct-13 9:21 
GeneralRe: Simples Snaplines code Pin
Ron Beyer8-Oct-13 9:44
professionalRon Beyer8-Oct-13 9:44 
Questiondevelop multiplayer game Pin
cdpsource8-Oct-13 2:33
cdpsource8-Oct-13 2:33 
AnswerRe: develop multiplayer game Pin
Eddy Vluggen8-Oct-13 5:00
professionalEddy Vluggen8-Oct-13 5:00 
GeneralRe: develop multiplayer game Pin
cdpsource8-Oct-13 21:05
cdpsource8-Oct-13 21:05 
GeneralRe: develop multiplayer game Pin
Eddy Vluggen9-Oct-13 3:04
professionalEddy Vluggen9-Oct-13 3:04 
AnswerRe: develop multiplayer game Pin
OriginalGriff8-Oct-13 8:55
mveOriginalGriff8-Oct-13 8:55 
AnswerRe: develop multiplayer game Pin
Abhinav S8-Oct-13 20:44
Abhinav S8-Oct-13 20:44 
QuestionInsert Multiple data inputs on single row Pin
ramkie7-Oct-13 21:38
ramkie7-Oct-13 21:38 
AnswerRe: Insert Multiple data inputs on single row Pin
BillWoodruff7-Oct-13 22:42
professionalBillWoodruff7-Oct-13 22:42 
AnswerRe: Insert Multiple data inputs on single row Pin
Dave Kreskowiak8-Oct-13 5:42
mveDave Kreskowiak8-Oct-13 5:42 

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.