Click here to Skip to main content
15,889,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: computational cost of math functions Pin
Calin Negru17-Apr-20 8:14
Calin Negru17-Apr-20 8:14 
GeneralRe: computational cost of math functions Pin
Joe Woodbury17-Apr-20 10:43
professionalJoe Woodbury17-Apr-20 10:43 
GeneralRe: computational cost of math functions Pin
kalberts17-Apr-20 11:47
kalberts17-Apr-20 11:47 
GeneralRe: computational cost of math functions Pin
Joe Woodbury17-Apr-20 12:53
professionalJoe Woodbury17-Apr-20 12:53 
GeneralRe: computational cost of math functions Pin
kalberts17-Apr-20 13:03
kalberts17-Apr-20 13:03 
AnswerRe: computational cost of math functions Pin
CPallini17-Apr-20 7:04
mveCPallini17-Apr-20 7:04 
AnswerRe: computational cost of math functions Pin
kalberts17-Apr-20 12:37
kalberts17-Apr-20 12:37 
GeneralRe: computational cost of math functions Pin
harold aptroot17-Apr-20 16:12
harold aptroot17-Apr-20 16:12 
There are lists of the timing properties (not "the time it takes", it's more complicated and you must at least distinguish latency and throughput) of individual instructions for particular CPUs, for example
sqrt more or less corresponds to the similarly named instructions (fsqrt or sqrtsd whichever is appropriate), except it may have some overhead in order to test for negative input and set errno. sin and cos normally don't correspond to fsin and fcos, along with other trig functions they're normally implemented as some non-trivial function of many instructions. The exact implementation varies based on which math library you use. About the only way to get their timing data is to test them yourself.

A popular approach for fast ray-tracers is to use SIMD processing through ray-packet tracing, though there are other ways to incorporate SIMD. Intel has an introduction to ray-packet tracing, it's showing its age with the 128bit SIMD but it could be extended to 256bit. There is a lot of literature about SIMD in ray tracing, and it's probably useful to read some of it in advance because once you're written a non-SIMD ray tracer it becomes harder to hack SIMD in, than it would have been to base the design around it in the first place.
AnswerRe: computational cost of math functions Pin
Calin Negru18-Apr-20 8:56
Calin Negru18-Apr-20 8:56 
Questionmfc LoadBitmap hangs my application... Pin
charlieg15-Apr-20 12:21
charlieg15-Apr-20 12:21 
AnswerRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 1:37
_Flaviu16-Apr-20 1:37 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 4:30
charlieg16-Apr-20 4:30 
GeneralRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 5:24
_Flaviu16-Apr-20 5:24 
GeneralRe: mfc LoadBitmap hangs my application... Pin
leon de boer16-Apr-20 6:29
leon de boer16-Apr-20 6:29 
GeneralRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 7:21
_Flaviu16-Apr-20 7:21 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 9:47
charlieg16-Apr-20 9:47 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 10:27
charlieg16-Apr-20 10:27 
GeneralRe: mfc LoadBitmap hangs my application... Pin
leon de boer16-Apr-20 16:37
leon de boer16-Apr-20 16:37 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg17-Apr-20 9:43
charlieg17-Apr-20 9:43 
QuestionWindows CBT Hooks Pin
Richard Andrew x6414-Apr-20 11:58
professionalRichard Andrew x6414-Apr-20 11:58 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan14-Apr-20 21:21
mveRichard MacCutchan14-Apr-20 21:21 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 4:28
professionalRichard Andrew x6415-Apr-20 4:28 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan15-Apr-20 4:57
mveRichard MacCutchan15-Apr-20 4:57 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 5:49
professionalRichard Andrew x6415-Apr-20 5:49 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan15-Apr-20 6:05
mveRichard MacCutchan15-Apr-20 6:05 

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.