Search:

Type: Posts; User: Phuzzillogic

Search: Search took 0.01 seconds.

  1. Just realized it's commonly called DOTproduct,...

    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...
  2. Replies
    11
    Views
    4,535

    How do you measure, and what compiler/cpu? I...

    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...
  3. Optimized inproduct of floats/doubles? (sse?)

    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...
  4. Replies
    11
    Views
    4,535

    Optimized clipping of floats/doubles ?

    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...
  5. Thanks for all your answers. JVene, regarding the...

    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...
  6. Is there something like break(2) (multiple break) ?

    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!
    }
    }
  7. Replies
    57
    Views
    12,682

    Ah I see, you're right, the correction you...

    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%...
  8. Replies
    57
    Views
    12,682

    Sorry to bump an old thread, but I came accross...

    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...
Results 1 to 8 of 8