Click here to Skip to main content
15,891,864 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: Wordle Hurdle Pin
Amarnath S22-Apr-22 14:29
professionalAmarnath S22-Apr-22 14:29 
GeneralRe: Wordle Hurdle Pin
Peter_in_278022-Apr-22 19:22
professionalPeter_in_278022-Apr-22 19:22 
GeneralRe: Wordle Hurdle Pin
OriginalGriff22-Apr-22 19:59
mveOriginalGriff22-Apr-22 19:59 
GeneralRe: Wordle Hurdle Pin
Greg Utas23-Apr-22 0:23
professionalGreg Utas23-Apr-22 0:23 
GeneralRe: Wordle Hurdle Pin
Cp-Coder23-Apr-22 1:28
Cp-Coder23-Apr-22 1:28 
GeneralRe: Wordle Hurdle Pin
FreedMalloc23-Apr-22 5:51
FreedMalloc23-Apr-22 5:51 
GeneralRe: Wordle Hurdle Pin
Kirk 1038982125-Apr-22 2:50
Kirk 1038982125-Apr-22 2:50 
GeneralUh oh, I think I invented something in C++ Pin
honey the codewitch22-Apr-22 5:09
mvahoney the codewitch22-Apr-22 5:09 
The prospect scares me, because 99 times out of 100 if something isn't being done in C++ by others it's either because it is and I just wasn't aware of it, or it isn't because it's an anti-pattern.

GFX is basically one big selector.

What it does is take usually two different things at compile time, and based on their on respective capabilities, it will perform the operation you gave it differently. For example, a raw bitmap exposes its memory directly through begin() and end(), but a display device cannot since it's connected over a bus. It however, has ways to do DMA transfers, so it supports methods like copy_from and copy_to potentially which can copy a window of pixels from or to the display. Failing that, there's always reading and writing individual pixels, but that is the last resort.

What happens is this - at compile time

Operation+CompileTimeArguments+DrawDestination(maybe +DrawSource) = Signature

That selects different code paths based on different capabilities of the draw source and destination, the operation, and the arguments. At compile time. In doing so it basically legos code together to make an efficient code path for performing the operation with the given arguments.

The templates to make this happen are a mess, but I don't know how else I can achieve the sort of flexibility and efficiency I enjoy with this technique.

It's amazing. It's also probably incomprehensible if you didn't write it, but thus far I've been able to maintain it for a year as it has grown and evolved. The architecture remains the same.

I don't know what to call this technique "multiplexing code selection?" ack.. no matter what it's a mouthful, but one of the problems with it is it creates an exponentially larger test matrix as you add more compile time variation.

It strikes me as an anti-pattern maybe, but I refuse to accept that absent an alternative to accomplish what GFX does.
To err is human. Fortune favors the monsters.

GeneralRe: Uh oh, I think I invented something in C++ Pin
PIEBALDconsult22-Apr-22 5:55
mvePIEBALDconsult22-Apr-22 5:55 
GeneralRe: Uh oh, I think I invented something in C++ Pin
honey the codewitch22-Apr-22 6:07
mvahoney the codewitch22-Apr-22 6:07 
GeneralRe: Uh oh, I think I invented something in C++ Pin
Mircea Neacsu22-Apr-22 6:57
Mircea Neacsu22-Apr-22 6:57 
GeneralRe: Uh oh, I think I invented something in C++ Pin
honey the codewitch22-Apr-22 7:21
mvahoney the codewitch22-Apr-22 7:21 
GeneralRe: Uh oh, I think I invented something in C++ Pin
Gary R. Wheeler23-Apr-22 3:13
Gary R. Wheeler23-Apr-22 3:13 
GeneralRe: Uh oh, I think I invented something in C++ Pin
Andy Brummer27-Apr-22 9:27
sitebuilderAndy Brummer27-Apr-22 9:27 
GeneralRe: Uh oh, I think I invented something in C++ Pin
honey the codewitch27-Apr-22 10:59
mvahoney the codewitch27-Apr-22 10:59 
GeneralSpoiler alert about Wordle Pin
Cp-Coder22-Apr-22 3:08
Cp-Coder22-Apr-22 3:08 
GeneralRe: Spoiler alert about Wordle Pin
OriginalGriff22-Apr-22 4:08
mveOriginalGriff22-Apr-22 4:08 
GeneralRe: Spoiler alert about Wordle Pin
Rage22-Apr-22 4:14
professionalRage22-Apr-22 4:14 
GeneralRe: Spoiler alert about Wordle Pin
obermd22-Apr-22 9:08
obermd22-Apr-22 9:08 
GeneralRe: Spoiler alert about Wordle Pin
dan!sh 24-Apr-22 21:16
professional dan!sh 24-Apr-22 21:16 
GeneralRe: Spoiler alert about Wordle Pin
dandy7222-Apr-22 4:27
dandy7222-Apr-22 4:27 
GeneralRe: Spoiler alert about Wordle Pin
DRHuff22-Apr-22 4:53
DRHuff22-Apr-22 4:53 
QuestionRe: Spoiler alert about Wordle Pin
Eddy Vluggen22-Apr-22 8:31
professionalEddy Vluggen22-Apr-22 8:31 
AnswerRe: Spoiler alert about Wordle Pin
theoldfool22-Apr-22 8:38
professionaltheoldfool22-Apr-22 8:38 
AnswerRe: Spoiler alert about Wordle Pin
Cp-Coder22-Apr-22 9:10
Cp-Coder22-Apr-22 9:10 

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.