/[escript]/branches/clazy/escriptcore/src/DataVectorOps.h
ViewVC logotype

Diff of /branches/clazy/escriptcore/src/DataVectorOps.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6516 by jfenwick, Fri Mar 3 01:41:39 2017 UTC revision 6517 by jfenwick, Mon Mar 6 06:35:31 2017 UTC
# Line 1169  binaryOpVector(DataTypes::RealVectorType Line 1169  binaryOpVector(DataTypes::RealVectorType
1169  */  */
1170  template <class ResELT, class LELT, class RELT>  template <class ResELT, class LELT, class RELT>
1171  void  void
1172  binaryOpVectorLazyHelper(ResELT* res,  binaryOpVectorLazyArithmeticHelper(ResELT* res,
1173                           const LELT* left,                           const LELT* left,
1174                           const RELT* right,                           const RELT* right,
1175                           const size_t chunksize,                           const size_t chunksize,
# Line 1201  binaryOpVectorLazyHelper(ResELT* res, Line 1201  binaryOpVectorLazyHelper(ResELT* res,
1201          case DIV:          case DIV:
1202              OPVECLAZYBODY(left[lroffset+s]/right[rroffset+s])              OPVECLAZYBODY(left[lroffset+s]/right[rroffset+s])
1203              break;              break;
1204            default:
1205                ESYS_ASSERT(false, "Invalid operation. This should never happen!");
1206                // I can't throw here because this will be called inside a parallel section
1207        }
1208    }
1209    
1210    
1211    /**
1212     * This assumes that all data involved have the same points per sample and same shape
1213     * This version is to be called from within DataLazy.
1214     * It does not have openmp around loops because it will be evaluating individual samples
1215     * (Which will be done within an enclosing openmp region.
1216    */
1217    template <class ResELT, class LELT, class RELT>
1218    void
1219    binaryOpVectorLazyRelationalHelper(ResELT* res,
1220                             const LELT* left,
1221                             const RELT* right,
1222                             const size_t chunksize,
1223                             const size_t onumsteps,
1224                             const size_t numsteps,
1225                             const size_t resultStep,
1226                             const size_t leftstep,
1227                             const size_t rightstep,
1228                             const size_t oleftstep,
1229                             const size_t orightstep,
1230                             size_t lroffset,
1231                             size_t rroffset,
1232                             escript::ES_optype operation)          // operation to perform
1233    {
1234        switch (operation)
1235        {
1236          case LESS:          case LESS:
1237              OPVECLAZYBODY(left[lroffset+s]<right[rroffset+s])              OPVECLAZYBODY(left[lroffset+s]<right[rroffset+s])
1238              break;              break;
# Line 1219  binaryOpVectorLazyHelper(ResELT* res, Line 1251  binaryOpVectorLazyHelper(ResELT* res,
1251      }      }
1252  }  }
1253    
1254    
1255  /**  /**
1256   * This assumes that all data involved have the same points per sample and same shape   * This assumes that all data involved have the same points per sample and same shape
1257  */  */

Legend:
Removed from v.6516  
changed lines
  Added in v.6517

  ViewVC Help
Powered by ViewVC 1.1.26