Changeset 508 for trunk/ADOL-C/include


Ignore:
Timestamp:
May 14, 2014 9:00:40 AM (5 years ago)
Author:
kulshres
Message:

Add parenthesis to make bit extraction correct

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/include/adolc/adtl.h

    r429 r508  
    275275
    276276inline bool adouble::_do_val() {
    277     return (forward_mode & ADTL_Z_MASK == ADTL_Z_MASK);
     277    return ((forward_mode & ADTL_Z_MASK) == ADTL_Z_MASK);
    278278}
    279279#define do_val() likely(adouble::_do_val())
     
    281281
    282282inline bool adouble::_do_adval() {
    283     return (forward_mode & ADTL_F_MASK == ADTL_F_MASK);
     283    return ((forward_mode & ADTL_F_MASK) == ADTL_F_MASK);
    284284}
    285285#define do_adval() likely(adouble::_do_adval())
     
    287287
    288288inline bool adouble::_do_indo() {
    289     return (forward_mode & ADTL_I_MASK == ADTL_I_MASK);
     289    return ((forward_mode & ADTL_I_MASK) == ADTL_I_MASK);
    290290}
    291291#define do_indo() unlikely(adouble::_do_indo())
Note: See TracChangeset for help on using the changeset viewer.