Changeset 1601 for trunk/test_more


Ignore:
Timestamp:
Dec 5, 2009 9:42:24 AM (10 years ago)
Author:
bradbell
Message:

trunk: In optimize, finish refactoring binary operator cases.

operator.hpp: generalize binary match routine to handle all cases.
operator.cpp: fix spelling error in comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/optimize.cpp

    r1596 r1601  
    275275                opt      += 2;
    276276
    277                 // non-communative binary operator where left is a variable
     277                // non-commutative binary operator where left is a variable
    278278                // and right is a parameter
    279279                Scalar c1 = x[2] - 3.;
     
    281281                opt      += 1;
    282282
    283                 // non-communative binary operator where left is a parameter
     283                // non-commutative binary operator where left is a parameter
    284284                // and right is a variable
    285285                Scalar d1 = 3. / x[3];
     
    287287                opt      += 1;
    288288
    289                 // non-communative binary operator where left is a variable
     289                // non-commutative binary operator where left is a variable
    290290                // and right is a variable
    291291                Scalar e1 = pow(x[3], x[4]);
     
    293293                opt      += 3;
    294294
    295                 // communative binary operator where  left is a variable
     295                // commutative binary operator where  left is a variable
    296296                // and right is a parameter
    297297                Scalar f1 = x[5] * 5.;
     
    299299                opt      += 1;
    300300
    301                 // communative binary operator where  left is a variable
     301                // commutative binary operator where  left is a variable
    302302                // and right is a variable
    303303                Scalar g1 = x[5] + x[6];
Note: See TracChangeset for help on using the changeset viewer.