Click here to Skip to main content
15,890,512 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I've been stuck for two days on nothing Pin
NeverJustHere23-Jun-21 18:08
NeverJustHere23-Jun-21 18:08 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch23-Jun-21 18:36
mvahoney the codewitch23-Jun-21 18:36 
GeneralRe: I've been stuck for two days on nothing Pin
NeverJustHere23-Jun-21 23:53
NeverJustHere23-Jun-21 23:53 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch24-Jun-21 1:20
mvahoney the codewitch24-Jun-21 1:20 
GeneralRe: I've been stuck for two days on nothing Pin
ElectronProgrammer25-Jun-21 12:33
ElectronProgrammer25-Jun-21 12:33 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch25-Jun-21 15:21
mvahoney the codewitch25-Jun-21 15:21 
GeneralRe: I've been stuck for two days on nothing Pin
Greg Utas24-Jun-21 0:32
professionalGreg Utas24-Jun-21 0:32 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch24-Jun-21 1:24
mvahoney the codewitch24-Jun-21 1:24 
It would be impossible to do what I am doing efficiently and by hand in C++ using any other method than what I'm doing.

Generic programming has no real substitute in terms of C++ functionality. You basically *can't* replace it with virtual base classes unless you were using it where you didn't need it in the first place.

Consider this:

I have a pixel. The pixel is user-defined in terms of the number of color channels it has, their names, and what their binary layout, min and max channel values are, etc. This is too involved to compute at run time. It would kill performance

Now, for every draw method, it deals in pixels like this, but because a pixel must be typed to its functionality, literally the only way I could make it polymorphic is to use a vtbl every time i needed a pixel. That's just not acceptable in terms of performance.

Binding using templates is the solution. That way you can inline, or you can otherwise aggressively optimize away those calls.
Real programmers use butterflies

GeneralRe: I've been stuck for two days on nothing Pin
Greg Utas24-Jun-21 1:41
professionalGreg Utas24-Jun-21 1:41 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch24-Jun-21 1:51
mvahoney the codewitch24-Jun-21 1:51 
GeneralRe: I've been stuck for two days on nothing Pin
Member 1419238225-Jun-21 3:42
Member 1419238225-Jun-21 3:42 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch25-Jun-21 4:36
mvahoney the codewitch25-Jun-21 4:36 
QuestionRe: I've been stuck for two days on nothing Pin
CPallini24-Jun-21 2:21
mveCPallini24-Jun-21 2:21 
AnswerRe: I've been stuck for two days on nothing Pin
honey the codewitch24-Jun-21 6:09
mvahoney the codewitch24-Jun-21 6:09 
GeneralRe: I've been stuck for two days on nothing Pin
obeobe24-Jun-21 22:58
obeobe24-Jun-21 22:58 
GeneralRe: I've been stuck for two days on nothing Pin
AnotherKen25-Jun-21 17:54
professionalAnotherKen25-Jun-21 17:54 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch25-Jun-21 18:22
mvahoney the codewitch25-Jun-21 18:22 
GeneralRe: I've been stuck for two days on nothing Pin
AnotherKen26-Jun-21 7:55
professionalAnotherKen26-Jun-21 7:55 
GeneralRe: I've been stuck for two days on nothing Pin
honey the codewitch26-Jun-21 9:12
mvahoney the codewitch26-Jun-21 9:12 
GeneralNo more McAfee Pin
OriginalGriff23-Jun-21 9:59
mveOriginalGriff23-Jun-21 9:59 
GeneralRe: No more McAfee Pin
Matthew Dennis23-Jun-21 10:02
sysadminMatthew Dennis23-Jun-21 10:02 
GeneralRe: No more McAfee PinPopular
Slacker00723-Jun-21 10:07
professionalSlacker00723-Jun-21 10:07 
GeneralRe: No more McAfee Pin
pkfox23-Jun-21 10:19
professionalpkfox23-Jun-21 10:19 
GeneralRe: No more McAfee Pin
Mike Hankey23-Jun-21 11:00
mveMike Hankey23-Jun-21 11:00 
GeneralRe: No more McAfee Pin
W Balboos, GHB24-Jun-21 2:37
W Balboos, GHB24-Jun-21 2:37 

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.