Click here to Skip to main content
15,921,840 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error Only assignment, call, increment, decrement, and new object expressions can be used as a statement. Pin
piano_Korg9-Oct-13 17:25
professionalpiano_Korg9-Oct-13 17:25 
QuestionRe: Error Only assignment, call, increment, decrement, and new object expressions can be used as a statement. Pin
Richard MacCutchan9-Oct-13 21:34
mveRichard MacCutchan9-Oct-13 21:34 
Questionforward stdIn via ssh to application on linux server Pin
Beachi869-Oct-13 11:16
Beachi869-Oct-13 11:16 
QuestionAdd Table To DBML - Doesn't Show Up In Code Pin
Kevin Marois8-Oct-13 9:55
professionalKevin Marois8-Oct-13 9:55 
AnswerRe: Add Table To DBML - Doesn't Show Up In Code Pin
Richard MacCutchan8-Oct-13 9:59
mveRichard MacCutchan8-Oct-13 9:59 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Kevin Marois8-Oct-13 10:00
professionalKevin Marois8-Oct-13 10:00 
AnswerRe: Add Table To DBML - Doesn't Show Up In Code Pin
Member 100425318-Oct-13 19:24
Member 100425318-Oct-13 19:24 
AnswerRe: Add Table To DBML - Doesn't Show Up In Code Pin
Richard Andrew x649-Oct-13 4:11
professionalRichard Andrew x649-Oct-13 4:11 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Pete O'Hanlon9-Oct-13 5:11
mvePete O'Hanlon9-Oct-13 5:11 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Dave Kreskowiak9-Oct-13 7:08
mveDave Kreskowiak9-Oct-13 7:08 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Pete O'Hanlon9-Oct-13 8:39
mvePete O'Hanlon9-Oct-13 8:39 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Dave Kreskowiak9-Oct-13 10:09
mveDave Kreskowiak9-Oct-13 10:09 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Pete O'Hanlon9-Oct-13 10:29
mvePete O'Hanlon9-Oct-13 10:29 
GeneralRe: Add Table To DBML - Doesn't Show Up In Code Pin
Dave Kreskowiak9-Oct-13 15:21
mveDave Kreskowiak9-Oct-13 15:21 
AnswerRe: Add Table To DBML - Doesn't Show Up In Code Pin
Brisingr Aerowing9-Oct-13 8:54
professionalBrisingr Aerowing9-Oct-13 8:54 
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 

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.