Click here to Skip to main content
14,332,387 members

C / C++ / MFC

 
AnswerRe: Controls, variable and dialogs Pin
Freak3030-Mar-15 1:22
memberFreak3030-Mar-15 1:22 
Questionwin32 - how avoid flickers? Pin
Member 1154582425-Mar-15 11:50
memberMember 1154582425-Mar-15 11:50 
QuestionVisual Studio C++ compiler empty functions Pin
severin025-Mar-15 10:28
memberseverin025-Mar-15 10:28 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Richard Andrew x6425-Mar-15 15:39
professionalRichard Andrew x6425-Mar-15 15:39 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Daniel Pfeffer25-Mar-15 23:00
professionalDaniel Pfeffer25-Mar-15 23:00 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Maximilien26-Mar-15 4:38
memberMaximilien26-Mar-15 4:38 
QuestionUnable to get WTS_SESSION_LOGON event notification. How to capture the event when user log on to the machine.? Pin
Member 874411124-Mar-15 0:09
memberMember 874411124-Mar-15 0:09 
QuestionIs there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
prime_tang23-Mar-15 23:37
memberprime_tang23-Mar-15 23:37 
The following code is a basic algorithm for hamming distance calculation, but due to the design of my application, it requires many times to use this algorithm, in order to improve application efficiency, I want to improve the efficiency of this algorithm, is there any appropriate methods? Assembly language possible?

unsigned dist(const unsigned char *vec1, const unsigned char *vec2, unsigned dim)
{
    const unsigned char popCountTable[] =
    {
        0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
        1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
        1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
        2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
        1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
        2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
        2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
        3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
    };
    unsigned dist_ = 0;
    for (unsigned i = 0; i != dim; ++i)
    {
        dist_ += popCountTable[vec1[i] ^ vec2[i]];
    }
    return dist_;
}

AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Richard MacCutchan24-Mar-15 3:40
protectorRichard MacCutchan24-Mar-15 3:40 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Jochen Arndt24-Mar-15 4:14
mveJochen Arndt24-Mar-15 4:14 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Chris Losinger24-Mar-15 9:06
professionalChris Losinger24-Mar-15 9:06 
SuggestionRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
.Shoaib25-Mar-15 6:35
member.Shoaib25-Mar-15 6:35 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
jschell25-Mar-15 10:58
memberjschell25-Mar-15 10:58 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Stefan_Lang8-Apr-15 4:52
memberStefan_Lang8-Apr-15 4:52 
QuestionLink Error Which .lib to include Pin
ForNow21-Mar-15 19:28
memberForNow21-Mar-15 19:28 
AnswerRe: Link Error Which .lib to include Pin
Richard MacCutchan21-Mar-15 23:58
protectorRichard MacCutchan21-Mar-15 23:58 
GeneralRe: Link Error Which .lib to include Pin
ForNow22-Mar-15 16:50
memberForNow22-Mar-15 16:50 
GeneralRe: Link Error Which .lib to include Pin
Frankie-C23-Mar-15 0:36
memberFrankie-C23-Mar-15 0:36 
GeneralRe: Link Error Which .lib to include Pin
ForNow23-Mar-15 2:10
memberForNow23-Mar-15 2:10 
AnswerRe: Link Error Which .lib to include Pin
Frankie-C22-Mar-15 0:19
memberFrankie-C22-Mar-15 0:19 
QuestionMALLOC FUNCTION IMPLEMENTATION Pin
Member 1154244420-Mar-15 10:45
memberMember 1154244420-Mar-15 10:45 
GeneralRe: MALLOC FUNCTION IMPLEMENTATION Pin
PIEBALDconsult20-Mar-15 11:35
protectorPIEBALDconsult20-Mar-15 11:35 
QuestionRe: MALLOC FUNCTION IMPLEMENTATION Pin
jeron120-Mar-15 11:56
memberjeron120-Mar-15 11:56 
AnswerRe: MALLOC FUNCTION IMPLEMENTATION Pin
jschell20-Mar-15 13:03
memberjschell20-Mar-15 13:03 
QuestionHow to use MFC to design an app that can connect 2 types of database Pin
DHLao19-Mar-15 17:36
memberDHLao19-Mar-15 17: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.