18 #if !defined escript_UnaryOp_20040315_H 19 #define escript_UnaryOp_20040315_H 39 template <
class UnaryFunction>
43 UnaryFunction operation)
50 #pragma omp parallel for private(i,j) schedule(static) 51 for (i=0;i<numSamples;i++) {
52 for (j=0;j<numDPPSample;j++) {
58 template <
class UnaryFunction>
62 UnaryFunction operation)
66 DataTagged::DataMapType::const_iterator i;
67 DataTagged::DataMapType::const_iterator lookupEnd=lookup.end();
70 for (i=lookup.begin();i!=lookupEnd;i++) {
77 template <
class UnaryFunction>
81 UnaryFunction operation)
DataVector implements an arbitrarily long vector of data values. DataVector is the underlying data co...
Definition: DataVector.h:44
virtual DataTypes::ValueType::size_type getPointOffset(int sampleNo, int dataPointNo) const
Return the offset for the given given data point. This returns the offset in bytes for the given poin...
Definition: DataExpanded.cpp:305
void unaryOp(DataExpanded &data, UnaryFunction operation)
Perform the given unary operation on each data point of the given Data object. Called by Data::unaryO...
Definition: UnaryOp.h:42
DataTypes::ValueType::size_type getDefaultOffset() const
Returns the offset in the structure which stores the default value.
Definition: DataTagged.h:608
Definition: AbstractContinuousDomain.cpp:24
DataConstant stores a single data point which represents the entire function space.
Definition: DataConstant.h:37
Give a short description of what DataExpanded does.
Definition: DataExpanded.h:44
const DataMapType & getTagLookup() const
getTagLookup
Definition: DataTagged.h:629
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:38
void unaryOp(DataTypes::ValueType &data, const DataTypes::ShapeType &shape, DataTypes::ValueType::size_type offset, UnaryFunction operation)
Perform the unary operation on the data point specified by the given offset. Applies the specified op...
Definition: DataMaths.h:826
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:44
DataTypes::ValueType & getVectorRW()
Return a reference to the underlying DataVector.
Definition: DataTagged.cpp:890
int getNumDPPSample() const
Return the number of data points per sample.
Definition: DataAbstract.h:562
std::map< int, int > DataMapType
Definition: DataTagged.h:57
DataTypes::ValueType & getVectorRW()
Return a reference to the underlying DataVector.
Definition: DataConstant.cpp:388
int getNumSamples() const
Return the number of samples.
Definition: DataAbstract.h:573
const DataTypes::ShapeType & getShape() const
Return the shape information for the point data.
Definition: DataAbstract.h:592
DataTypes::ValueType & getVectorRW()
Return a a reference to the underlying DataVector.
Definition: DataExpanded.cpp:749
long size_type
Definition: DataVector.h:60