Just realized it's commonly called DOTproduct, not inproduct, sorry for the confusion :)
I'm using all this to pull out some statistics from large amounts of data (typically structured in...
Type: Posts; User: Phuzzillogic
Just realized it's commonly called DOTproduct, not inproduct, sorry for the confusion :)
I'm using all this to pull out some statistics from large amounts of data (typically structured in...
How do you measure, and what compiler/cpu?
I did a loop of a few million times, calling this function with several different cases in a row (and adding the result for dummy output, otherwise the...
I am trying to get the following code as fast as possible:
void Foo( double *dest, const double *source, double *vec1, const double *vec2 )
{
// source and dest are [64], vec1 and vec2 are...
Is there a way to do this more efficiently?
inline void Clip( double &x, double a, double b ) // makes sure x is between a and b
{
if (x<a) x = a;
else if (x>b) x = b;
}
Note that this...
Thanks for all your answers. JVene, regarding the last remark in your detailed reply:
Suppose my object is an image, and for some reason I want to check if some upper left rectangle (of custom...
Suppose I have
for (y=0; y<100; y++)
{
for (x=0; x<100; x++)
{
if (something(x,y))
{
break(2); // ?? I want to break out of the x AND y loop!
}
}
Ah I see, you're right, the correction you applied indeed makes up for the missing term.
Nonetheless, when I compare this "single pow" method to my integer version, the latter is still almost 15%...
Sorry to bump an old thread, but I came accross this accidentally and wanted to share my thoughts.
First of all, the problem with this method posted above:
pow(PHI, n) / sqrt(5.0) is that it's...