Click here to Skip to main content
12,253,139 members (52,443 online)

C / C++ / MFC

 
GeneralRe: VC6.0 compiler error C2664 while using GUID Pin
Vaclav_Sal9-Dec-12 7:14
memberVaclav_Sal9-Dec-12 7:14 
GeneralRe: VC6.0 compiler error C2664 while using GUID Pin
jschell9-Dec-12 8:16
memberjschell9-Dec-12 8:16 
AnswerRe: VC6.0 compiler error C2664 while using GUID Pin
PecuniousPete10-Dec-12 8:00
memberPecuniousPete10-Dec-12 8:00 
AnswerRe: VC6.0 compiler error C2664 while using GUID Pin
Arild Fiskum19-Dec-12 10:18
memberArild Fiskum19-Dec-12 10:18 
QuestionFork Implementation using the native API RtlCloneUserProcess Pin
akhilmv889-Dec-12 4:00
memberakhilmv889-Dec-12 4:00 
QuestionDeclaring a TBYTE in C. Pin
Member 41945938-Dec-12 15:04
memberMember 41945938-Dec-12 15:04 
AnswerRe: Declaring a TBYTE in C. Pin
manoranjan8-Dec-12 20:56
membermanoranjan8-Dec-12 20:56 
GeneralRe: Declaring a TBYTE in C. Pin
Member 41945939-Dec-12 3:29
memberMember 41945939-Dec-12 3:29 
manoranjan,

I didn't think about using a typedef. I understand how to use in-line assembly, but without the typedef, trying to do

fld tbyte ptr var

fails.

Thank you for the answer.

I have re-written ENT in MASM to try to speed it up for huge files. I first modified ENT to handle the huge files, but it was terribly slow (for my 16 GB file). It took 32 minutes to process. I have cut that down to 10 minutes with my entmasm, and I am trying to validate the calculations by using printf statements in both to display all of the calculation inputs and outputs (for a VERY SHORT 10 BYTE file), but in the entropy calculations, the results do not quite match. The C compiler (visual Studio 2008) is optimizing the code and keeps most of the intermediate results on the FPU stack in temporary real format. My masm code was pretty brutal and kept each calculation separate, saving results in memory. I was using doubles (real8) for storage, and I think that the loss of precision when saving an FPU value as a real8 is what caused the result differences. I will convert my masm code to use tbytes and modify the ENT C code to do the same, and see if that makes the results match.

One other question. ENT has several 256 entry arrays for the counts and probabilities. If I change these arrays of 256 tbytes (10 BYTES each), will the mod 16 mis-alighment cause performance problems? Would it be better to make them arrays of owords (16 BYTES) and just index by 16 instead of by 10? I am not worried about the extra memory, I have GIGA BYTES of unused memory.

Dave.
GeneralRe: Declaring a TBYTE in C. Pin
manoranjan9-Dec-12 23:47
membermanoranjan9-Dec-12 23:47 
GeneralRe: Declaring a TBYTE in C. Pin
Member 419459310-Dec-12 12:11
memberMember 419459310-Dec-12 12:11 
GeneralRe: Declaring a TBYTE in C. Pin
manoranjan11-Dec-12 1:35
membermanoranjan11-Dec-12 1:35 
QuestionMethods bank account Pin
Magda63477-Dec-12 10:17
memberMagda63477-Dec-12 10:17 
AnswerRe: Methods bank account Pin
Richard MacCutchan7-Dec-12 21:56
mvpRichard MacCutchan7-Dec-12 21:56 
AnswerRe: Methods bank account Pin
Alan Balkany10-Dec-12 5:43
memberAlan Balkany10-Dec-12 5:43 
AnswerRe: Methods bank account Pin
PecuniousPete10-Dec-12 8:05
memberPecuniousPete10-Dec-12 8:05 
GeneralRe: Methods bank account Pin
Magda634713-Mar-13 11:36
memberMagda634713-Mar-13 11:36 
Questionread text file Pin
peoria1237-Dec-12 9:59
memberpeoria1237-Dec-12 9:59 
AnswerRe: read text file Pin
André Kraak7-Dec-12 20:56
memberAndré Kraak7-Dec-12 20:56 
AnswerRe: read text file Pin
sajeesh.c9-Dec-12 21:05
membersajeesh.c9-Dec-12 21:05 
QuestionWM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Vaclav_Sal7-Dec-12 4:10
memberVaclav_Sal7-Dec-12 4:10 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Jochen Arndt7-Dec-12 5:56
memberJochen Arndt7-Dec-12 5:56 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
jeron17-Dec-12 5:59
memberjeron17-Dec-12 5:59 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Vaclav_Sal7-Dec-12 6:58
memberVaclav_Sal7-Dec-12 6:58 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Richard MacCutchan7-Dec-12 21:51
mvpRichard MacCutchan7-Dec-12 21:51 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Vaclav_Sal9-Dec-12 5:47
memberVaclav_Sal9-Dec-12 5:47 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 5 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid