#include <DataLazy.h>
Public Member Functions | |
DataLazy (DataAbstract_ptr p) | |
Create an IDENTITY DataLazy for the given DataAbstract. | |
DataLazy (DataAbstract_ptr left, ES_optype op) | |
Produce a DataLazy for a unary operation. | |
DataLazy (DataAbstract_ptr left, ES_optype op, double tol) | |
Produce a DataLazy for a unary operation. | |
DataLazy (DataAbstract_ptr left, ES_optype op, int axis_offset) | |
Produce a DataLazy for a unary operation which requires a parameter. | |
DataLazy (DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op) | |
Produce a DataLazy for a binary operation. | |
DataLazy (DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op, int axis_offset, int transpose) | |
Produce a DataLazy for a binary operation with additional paramters. | |
DataLazy (DataAbstract_ptr left, ES_optype op, const int axis0, const int axis1) | |
Produce a DataLazy for a unary operation which requires two integer parameters. | |
~DataLazy () | |
DataReady_ptr | resolve () |
Evaluate the lazy expression. | |
std::string | toString () const |
Write the data as a string. | |
DataAbstract * | deepCopy () |
Return a deep copy of the current object. | |
ValueType::size_type | getLength () const |
This method throws an exception. It does not really make sense to ask this question of lazy data. | |
DataAbstract * | getSlice (const DataTypes::RegionType ®ion) const |
Return the given slice from this object. | |
DataTypes::ValueType::size_type | getPointOffset (int sampleNo, int dataPointNo) const |
Return the offset for the given sample. This returns the offset for the given point into the container holding the point data. | |
DataTypes::ValueType::size_type | getPointOffset (int sampleNo, int dataPointNo) |
int | getBuffsRequired () const |
size_t | getMaxSampleSize () const |
size_t | getSampleBufferSize () const |
const ValueType * | resolveSample (BufferGroup &bg, int sampleNo, size_t &roffset) |
Compute the value of the expression for the given sample. | |
bool | actsExpanded () const |
if resolve() was called would it produce expanded data. | |
virtual void | setToZero () |
Produces an IDENTITY DataLazy containing zero. The result will have the same shape and functionspace as before. | |
Private Types | |
typedef DataAbstract | parent |
typedef DataTypes::ValueType | ValueType |
typedef DataTypes::ShapeType | ShapeType |
Private Member Functions | |
void | LazyNodeSetup () |
const DataTypes::ValueType * | resolveNodeUnary (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeSample (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeBinary (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeNP1OUT (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeNP1OUT_P (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeTProd (int tid, int sampleNo, size_t &roffset) |
const DataTypes::ValueType * | resolveNodeNP1OUT_2P (int tid, int sampleNo, size_t &roffset) |
void | intoString (std::ostringstream &oss) const |
void | collapse () |
Converts the DataLazy into an IDENTITY storing the value of the expression. This method uses the original methods on the Data class to evaluate the expressions. For this reason, it should not be used on DataExpanded instances. (To do so would defeat the purpose of using DataLazy in the first place). | |
DataReady_ptr | collapseToReady () |
Evaluates the expression using methods on Data. This does the work for the collapse method. For reasons of efficiency do not call this method on DataExpanded nodes. | |
void | resolveToIdentity () |
resolve the expression can store it in the current node The current node will be converted to an identity node. | |
void | makeIdentity (const DataReady_ptr &p) |
helper method for resolveToIdentity and the identity constructor | |
DataReady_ptr | resolveVectorWorker () |
resolve to a ReadyData object using a vector buffer. | |
DataReady_ptr | resolveNodeWorker () |
resolve to a ReadyData object using storage at nodes | |
const ValueType * | resolveVectorSample (ValueType &v, size_t offset, int sampleNo, size_t &roffset) |
Compute the value of the expression for the given sample - using the vector buffer approach. | |
ValueType * | resolveUnary (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (unary operation) for the given sample. | |
ValueType * | resolveNP1OUT (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (unary non-pointwise operation) for the given sample. | |
DataTypes::ValueType * | resolveNP1OUT_P (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (unary operation) for the given sample. | |
DataTypes::ValueType * | resolveNP1OUT_2P (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (unary operation with int params) for the given sample. | |
ValueType * | resolveBinary (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (binary operation) for the given sample. | |
DataTypes::ValueType * | resolveTProd (ValueType &v, size_t offset, int sampleNo, size_t &roffset) const |
Compute the value of the expression (tensor product) for the given sample. | |
Private Attributes | |
DataReady_ptr | m_id |
DataLazy_ptr | m_left |
DataLazy_ptr | m_right |
ES_optype | m_op |
int | m_buffsRequired |
size_t | m_samplesize |
char | m_readytype |
int | m_axis_offset |
int | m_transpose |
int | m_SL |
int | m_SM |
int | m_SR |
double | m_tol |
size_t | m_maxsamplesize |
size_t | m_children |
size_t | m_height |
int * | m_sampleids |
DataVector | m_samples |
NOTE: This class assumes that the Data being pointed at are immutable.
typedef DataAbstract escript::DataLazy::parent [private] |
typedef DataTypes::ValueType escript::DataLazy::ValueType [private] |
Reimplemented from escript::DataAbstract.
typedef DataTypes::ShapeType escript::DataLazy::ShapeType [private] |
Reimplemented from escript::DataAbstract.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | p | ) |
Create an IDENTITY DataLazy for the given DataAbstract.
p | DataAbstract to be wrapped. |
DataException | if p is lazy data or it is not constant, tagged or expanded. |
References LAZYDEBUG, m_id, m_samplesize, and makeIdentity().
Referenced by DataLazy(), and deepCopy().
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
ES_optype | op | |||
) |
Produce a DataLazy for a unary operation.
left | DataAbstract to be operated on. | |
op | unary operation to perform. |
DataException | if op is not a unary operation or if p cannot be converted to a DataLazy. Note that IDENTITY is not considered a unary operation. |
References escript::calcBuffs(), DataLazy(), escript::G_NP1OUT, escript::G_UNARY, escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LazyNodeSetup(), m_buffsRequired, m_children, m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
ES_optype | op, | |||
double | tol | |||
) |
Produce a DataLazy for a unary operation.
left | DataAbstract to be operated on. | |
op | unary operation to perform. | |
tol | tolerance for operation |
DataException | if op is not a unary operation or if p cannot be converted to a DataLazy. Note that IDENTITY is not considered a unary operation. |
References escript::calcBuffs(), DataLazy(), escript::G_UNARY_P, escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LAZYDEBUG, LazyNodeSetup(), m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
ES_optype | op, | |||
int | axis_offset | |||
) |
Produce a DataLazy for a unary operation which requires a parameter.
left | DataAbstract to be operated on. | |
op | unary operation to perform. | |
axis_offset | the parameter for the operation |
DataException | if op is not a unary operation or if p cannot be converted to a DataLazy. Note that IDENTITY is not considered a unary operation. |
References escript::calcBuffs(), DataLazy(), escript::G_NP1OUT_P, escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LAZYDEBUG, LazyNodeSetup(), m_children, m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
DataAbstract_ptr | right, | |||
ES_optype | op | |||
) |
Produce a DataLazy for a binary operation.
left | left operand | |
right | right operand | |
op | unary operation to perform. |
DataException | if op is not a binary operation or if left or right cannot be converted to a DataLazy. |
References escript::Data::borrowDataPtr(), escript::calcBuffs(), DataLazy(), escript::G_BINARY, escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LAZYDEBUG, LazyNodeSetup(), m_buffsRequired, m_children, m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
DataAbstract_ptr | right, | |||
ES_optype | op, | |||
int | axis_offset, | |||
int | transpose | |||
) |
Produce a DataLazy for a binary operation with additional paramters.
left | left operand | |
right | right operand | |
op | unary operation to perform. | |
axis_offset | ||
transpose |
DataException | if op is not a binary operation requiring parameters or if left or right cannot be converted to a DataLazy. |
References escript::Data::borrowDataPtr(), escript::calcBuffs(), DataLazy(), escript::G_TENSORPROD, escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LAZYDEBUG, LazyNodeSetup(), m_children, m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::DataLazy | ( | DataAbstract_ptr | left, | |
ES_optype | op, | |||
const int | axis0, | |||
const int | axis1 | |||
) |
Produce a DataLazy for a unary operation which requires two integer parameters.
left | DataAbstract to be operated on. | |
op | unary operation to perform. | |
axis0 | the first parameter for the operation | |
axis1 | the second parameter for the operation |
DataException | if op is not a unary operation or if p cannot be converted to a DataLazy. Note that IDENTITY is not considered a unary operation. |
References escript::calcBuffs(), DataLazy(), escript::G_NP1OUT_2P, escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::getOpgroup(), LAZYDEBUG, LazyNodeSetup(), m_height, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, and SIZELIMIT.
escript::DataLazy::~DataLazy | ( | ) |
References m_sampleids, and m_samples.
DataReady_ptr escript::DataLazy::resolve | ( | ) | [virtual] |
Evaluate the lazy expression.
Implements escript::DataAbstract.
References m_id, and resolveToIdentity().
std::string escript::DataLazy::toString | ( | ) | const [virtual] |
Write the data as a string.
Implements escript::DataAbstract.
References intoString().
Referenced by resolveBinary(), resolveNodeBinary(), resolveNodeSample(), resolveNodeTProd(), resolveTProd(), and resolveVectorSample().
DataAbstract * escript::DataLazy::deepCopy | ( | ) | [virtual] |
Return a deep copy of the current object.
Implements escript::DataAbstract.
References DataLazy(), escript::G_BINARY, escript::G_IDENTITY, escript::G_NP1OUT, escript::G_TENSORPROD, escript::G_UNARY, escript::getOpgroup(), m_axis_offset, m_id, m_left, m_op, m_right, m_transpose, and escript::opToString().
DataTypes::ValueType::size_type escript::DataLazy::getLength | ( | ) | const [virtual] |
This method throws an exception. It does not really make sense to ask this question of lazy data.
Implements escript::DataAbstract.
DataAbstract * escript::DataLazy::getSlice | ( | const DataTypes::RegionType & | region | ) | const [virtual] |
Return the given slice from this object.
NB: The caller is responsible for managing the object created.
Implements escript::DataAbstract.
DataTypes::ValueType::size_type escript::DataLazy::getPointOffset | ( | int | sampleNo, | |
int | dataPointNo | |||
) | const [virtual] |
Return the offset for the given sample. This returns the offset for the given point into the container holding the point data.
sampleNo | - Input - sample number. | |
dataPointNo | - Input - data point number. |
Implements escript::DataAbstract.
References escript::IDENTITY, m_id, m_left, m_op, m_readytype, and m_right.
Referenced by resolveNP1OUT_2P(), and resolveNP1OUT_P().
DataTypes::ValueType::size_type escript::DataLazy::getPointOffset | ( | int | sampleNo, | |
int | dataPointNo | |||
) | [virtual] |
Implements escript::DataAbstract.
References collapse(), escript::IDENTITY, m_id, m_left, m_op, m_readytype, and m_right.
int escript::DataLazy::getBuffsRequired | ( | ) | const |
size_t escript::DataLazy::getMaxSampleSize | ( | ) | const |
References m_maxsamplesize.
Referenced by resolveBinary().
size_t escript::DataLazy::getSampleBufferSize | ( | ) | const [virtual] |
Implements escript::DataAbstract.
References m_maxsamplesize.
const DataTypes::ValueType * escript::DataLazy::resolveSample | ( | BufferGroup & | bg, | |
int | sampleNo, | |||
size_t & | roffset | |||
) |
Compute the value of the expression for the given sample.
bg | A BufferGroup to store intermediate results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::BufferGroup::getBuffer(), escript::BufferGroup::getOffset(), resolveNodeSample(), and resolveVectorSample().
Referenced by escript::Data::getSampleDataRO().
bool escript::DataLazy::actsExpanded | ( | ) | const [virtual] |
if resolve() was called would it produce expanded data.
Reimplemented from escript::DataAbstract.
References m_readytype.
void escript::DataLazy::setToZero | ( | ) | [virtual] |
Produces an IDENTITY DataLazy containing zero. The result will have the same shape and functionspace as before.
Reimplemented from escript::DataAbstract.
References privdebug.
void escript::DataLazy::LazyNodeSetup | ( | ) | [private] |
Allocates sample storage at each node
References m_sampleids, m_samples, m_samplesize, omp_get_max_threads(), and escript::DataVector::resize().
Referenced by DataLazy().
const DataTypes::ValueType * escript::DataLazy::resolveNodeUnary | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::ABS, escript::ACOS, escript::ACOSH, escript::ASIN, escript::ASINH, escript::ATAN, escript::ATANH, escript::COS, escript::COSH, escript::ERF, escript::EXP, escript::EZ, escript::fsign(), escript::GEZ, escript::GZ, escript::IDENTITY, escript::LEZ, escript::LOG, escript::LOG10, escript::LZ, m_left, m_op, m_readytype, m_samples, m_samplesize, m_tol, escript::NEG, escript::NEZ, escript::opToString(), escript::POS, escript::RECIP, escript::SIGN, escript::SIN, escript::SINH, escript::SQRT, escript::TAN, escript::TANH, and escript::tensor_unary_operation().
Referenced by resolveNodeSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeSample | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References collapse(), escript::G_BINARY, escript::G_NP1OUT, escript::G_NP1OUT_2P, escript::G_NP1OUT_P, escript::G_TENSORPROD, escript::G_UNARY, escript::G_UNARY_P, escript::getOpgroup(), escript::IDENTITY, LAZYDEBUG, m_id, m_op, m_readytype, m_sampleids, m_samples, m_samplesize, escript::opToString(), resolveNodeBinary(), resolveNodeNP1OUT(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNodeTProd(), resolveNodeUnary(), and toString().
Referenced by resolveNodeWorker(), and resolveSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeBinary | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::ADD, escript::DIV, LAZYDEBUG, m_left, m_op, m_right, m_samples, m_samplesize, escript::MUL, NO_ARG, escript::opToString(), escript::POW, PROC_OP, escript::DataTypes::shapeToString(), escript::SUB, and toString().
Referenced by resolveNodeSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeNP1OUT | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), escript::IDENTITY, m_left, m_op, m_readytype, m_samples, m_samplesize, escript::DataMaths::nonsymmetric(), escript::NSYM, escript::opToString(), escript::SYM, and escript::DataMaths::symmetric().
Referenced by resolveNodeSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeNP1OUT_P | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), escript::IDENTITY, m_axis_offset, m_left, m_op, m_readytype, m_samples, m_samplesize, escript::opToString(), escript::DataMaths::trace(), escript::TRACE, escript::TRANS, and escript::DataMaths::transpose().
Referenced by resolveNodeSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeTProd | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), LAZYDEBUG, m_left, m_op, m_right, m_samples, m_samplesize, m_SL, m_SM, m_SR, m_transpose, escript::matrix_matrix_product(), escript::opToString(), escript::DataTypes::pointToString(), escript::PROD, escript::DataTypes::shapeToString(), and toString().
Referenced by resolveNodeSample().
const DataTypes::ValueType * escript::DataLazy::resolveNodeNP1OUT_2P | ( | int | tid, | |
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), escript::IDENTITY, m_axis_offset, m_left, m_op, m_readytype, m_samples, m_samplesize, m_transpose, escript::opToString(), escript::SWAP, and escript::DataMaths::swapaxes().
Referenced by resolveNodeSample().
void escript::DataLazy::intoString | ( | std::ostringstream & | oss | ) | const [private] |
Does the work for toString.
References escript::G_BINARY, escript::G_IDENTITY, escript::G_NP1OUT, escript::G_NP1OUT_2P, escript::G_NP1OUT_P, escript::G_TENSORPROD, escript::G_UNARY, escript::G_UNARY_P, escript::getOpgroup(), m_axis_offset, m_id, m_left, m_op, m_right, m_transpose, and escript::opToString().
Referenced by toString().
void escript::DataLazy::collapse | ( | ) | [private] |
Converts the DataLazy into an IDENTITY storing the value of the expression. This method uses the original methods on the Data class to evaluate the expressions. For this reason, it should not be used on DataExpanded instances. (To do so would defeat the purpose of using DataLazy in the first place).
References collapseToReady(), escript::IDENTITY, m_id, m_op, and m_readytype.
Referenced by getPointOffset(), resolveNodeSample(), resolveNodeWorker(), resolveVectorSample(), and resolveVectorWorker().
DataReady_ptr escript::DataLazy::collapseToReady | ( | ) | [private] |
Evaluates the expression using methods on Data. This does the work for the collapse method. For reasons of efficiency do not call this method on DataExpanded nodes.
References escript::Data::abs(), escript::ABS, escript::Data::acos(), escript::ACOS, escript::Data::acosh(), escript::ACOSH, escript::ADD, escript::Data::asin(), escript::ASIN, escript::Data::asinh(), escript::ASINH, escript::Data::atan(), escript::ATAN, escript::Data::atanh(), escript::ATANH, escript::Data::borrowReadyPtr(), escript::C_GeneralTensorProduct(), escript::Data::cos(), escript::COS, escript::Data::cosh(), escript::COSH, escript::DIV, escript::Data::erf(), escript::ERF, escript::Data::exp(), escript::EXP, escript::EZ, escript::G_BINARY, escript::G_TENSORPROD, escript::getOpgroup(), escript::GEZ, escript::GZ, escript::IDENTITY, escript::LEZ, escript::Data::log(), escript::LOG, escript::Data::log10(), escript::LOG10, escript::LZ, m_axis_offset, m_id, m_left, m_op, m_readytype, m_right, m_tol, m_transpose, escript::MUL, escript::Data::neg(), escript::NEG, escript::NEZ, escript::Data::nonsymmetric(), escript::NSYM, escript::Data::oneOver(), escript::opToString(), escript::POS, escript::PROD, escript::RECIP, escript::Data::sign(), escript::SIGN, escript::Data::sin(), escript::SIN, escript::Data::sinh(), escript::SINH, escript::Data::sqrt(), escript::SQRT, escript::SUB, escript::SWAP, escript::Data::swapaxes(), escript::SYM, escript::Data::symmetric(), escript::Data::tan(), escript::TAN, escript::Data::tanh(), escript::TANH, escript::Data::trace(), escript::TRACE, escript::TRANS, escript::Data::transpose(), escript::Data::whereNegative(), escript::Data::whereNonNegative(), escript::Data::whereNonPositive(), escript::Data::whereNonZero(), escript::Data::wherePositive(), and escript::Data::whereZero().
Referenced by collapse().
void escript::DataLazy::resolveToIdentity | ( | ) | [private] |
resolve the expression can store it in the current node The current node will be converted to an identity node.
References escript::IDENTITY, m_op, makeIdentity(), resolveNodeWorker(), and resolveVectorWorker().
Referenced by resolve().
void escript::DataLazy::makeIdentity | ( | const DataReady_ptr & | p | ) | [private] |
helper method for resolveToIdentity and the identity constructor
References escript::IDENTITY, m_axis_offset, m_height, m_id, m_left, m_maxsamplesize, m_op, m_readytype, m_right, m_samplesize, m_SL, m_SM, m_SR, and m_transpose.
Referenced by DataLazy(), and resolveToIdentity().
DataReady_ptr escript::DataLazy::resolveVectorWorker | ( | ) | [private] |
resolve to a ReadyData object using a vector buffer.
References collapse(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getShape(), escript::IDENTITY, LAZYDEBUG, m_id, m_maxsamplesize, m_op, m_readytype, m_samplesize, escript::DataTypes::noValues(), omp_get_max_threads(), escript::DataTypes::pointToString(), resolveVectorSample(), and escript::DataVector::size().
Referenced by resolveToIdentity().
DataReady_ptr escript::DataLazy::resolveNodeWorker | ( | ) | [private] |
resolve to a ReadyData object using storage at nodes
References collapse(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumSamples(), escript::DataExpanded::getPointOffset(), escript::DataAbstract::getShape(), escript::DataExpanded::getVectorRW(), escript::IDENTITY, LAZYDEBUG, m_id, m_op, m_readytype, m_samplesize, and resolveNodeSample().
Referenced by resolveToIdentity().
const DataTypes::ValueType * escript::DataLazy::resolveVectorSample | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | [private] |
Compute the value of the expression for the given sample - using the vector buffer approach.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References collapse(), escript::G_BINARY, escript::G_NP1OUT, escript::G_NP1OUT_2P, escript::G_NP1OUT_P, escript::G_TENSORPROD, escript::G_UNARY, escript::G_UNARY_P, escript::getOpgroup(), escript::IDENTITY, LAZYDEBUG, m_id, m_op, m_readytype, escript::opToString(), resolveBinary(), resolveNP1OUT(), resolveNP1OUT_2P(), resolveNP1OUT_P(), resolveTProd(), resolveUnary(), and toString().
Referenced by resolveSample(), and resolveVectorWorker().
DataTypes::ValueType * escript::DataLazy::resolveUnary | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (unary operation) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::ABS, escript::ACOS, escript::ACOSH, escript::ASIN, escript::ASINH, escript::ATAN, escript::ATANH, escript::COS, escript::COSH, escript::ERF, escript::EXP, escript::EZ, escript::fsign(), escript::GEZ, escript::GZ, escript::LEZ, escript::LOG, escript::LOG10, escript::LZ, m_left, m_op, m_readytype, m_samplesize, m_tol, escript::NEG, escript::NEZ, escript::opToString(), escript::POS, escript::RECIP, escript::SIGN, escript::SIN, escript::SINH, escript::SQRT, escript::TAN, escript::TANH, and escript::tensor_unary_operation().
Referenced by resolveVectorSample().
DataTypes::ValueType * escript::DataLazy::resolveNP1OUT | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (unary non-pointwise operation) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
This method differs from the one above in that deals with operations that are not point-wise. That is, the answer cannot just be written on top of the input. Extra buffers are required for these operations.
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), LAZYDEBUG, m_left, m_op, m_readytype, m_samplesize, escript::DataMaths::nonsymmetric(), escript::NSYM, escript::opToString(), escript::SYM, and escript::DataMaths::symmetric().
Referenced by resolveVectorSample().
DataTypes::ValueType * escript::DataLazy::resolveNP1OUT_P | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (unary operation) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), getPointOffset(), escript::DataAbstract::getShape(), LAZYDEBUG, m_axis_offset, m_left, m_op, m_readytype, escript::opToString(), escript::DataTypes::pointToString(), escript::DataMaths::trace(), escript::TRACE, escript::TRANS, and escript::DataMaths::transpose().
Referenced by resolveVectorSample().
DataTypes::ValueType * escript::DataLazy::resolveNP1OUT_2P | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (unary operation with int params) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), getPointOffset(), escript::DataAbstract::getShape(), LAZYDEBUG, m_axis_offset, m_left, m_op, m_readytype, m_transpose, escript::opToString(), escript::SWAP, and escript::DataMaths::swapaxes().
Referenced by resolveVectorSample().
DataTypes::ValueType * escript::DataLazy::resolveBinary | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (binary operation) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::ADD, escript::DIV, getMaxSampleSize(), LAZYDEBUG, m_left, m_op, m_right, escript::MUL, NO_ARG, escript::opToString(), escript::POW, PROC_OP, escript::DataTypes::shapeToString(), escript::SUB, and toString().
Referenced by resolveVectorSample().
DataTypes::ValueType * escript::DataLazy::resolveTProd | ( | ValueType & | v, | |
size_t | offset, | |||
int | sampleNo, | |||
size_t & | roffset | |||
) | const [private] |
Compute the value of the expression (tensor product) for the given sample.
v | A vector to store intermediate results. | |
offset | Index in v to begin storing results. | |
sampleNo | Sample number to evaluate. | |
roffset | (output parameter) the offset in the return vector where the result begins. |
References escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getShape(), LAZYDEBUG, m_left, m_op, m_right, m_samplesize, m_SL, m_SM, m_SR, m_transpose, escript::matrix_matrix_product(), escript::opToString(), escript::DataTypes::pointToString(), escript::PROD, escript::DataTypes::shapeToString(), and toString().
Referenced by resolveVectorSample().
DataReady_ptr escript::DataLazy::m_id [private] |
DataLazy_ptr escript::DataLazy::m_left [private] |
Referenced by collapseToReady(), DataLazy(), deepCopy(), getPointOffset(), intoString(), makeIdentity(), resolveBinary(), resolveNodeBinary(), resolveNodeNP1OUT(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNodeTProd(), resolveNodeUnary(), resolveNP1OUT(), resolveNP1OUT_2P(), resolveNP1OUT_P(), resolveTProd(), and resolveUnary().
DataLazy_ptr escript::DataLazy::m_right [private] |
Referenced by collapseToReady(), DataLazy(), deepCopy(), getPointOffset(), intoString(), makeIdentity(), resolveBinary(), resolveNodeBinary(), resolveNodeTProd(), and resolveTProd().
ES_optype escript::DataLazy::m_op [private] |
Referenced by collapse(), collapseToReady(), DataLazy(), deepCopy(), getPointOffset(), intoString(), makeIdentity(), resolveBinary(), resolveNodeBinary(), resolveNodeNP1OUT(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNodeSample(), resolveNodeTProd(), resolveNodeUnary(), resolveNodeWorker(), resolveNP1OUT(), resolveNP1OUT_2P(), resolveNP1OUT_P(), resolveToIdentity(), resolveTProd(), resolveUnary(), resolveVectorSample(), and resolveVectorWorker().
int escript::DataLazy::m_buffsRequired [private] |
Referenced by DataLazy().
size_t escript::DataLazy::m_samplesize [private] |
Referenced by DataLazy(), LazyNodeSetup(), makeIdentity(), resolveNodeBinary(), resolveNodeNP1OUT(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNodeSample(), resolveNodeTProd(), resolveNodeUnary(), resolveNodeWorker(), resolveNP1OUT(), resolveTProd(), resolveUnary(), and resolveVectorWorker().
char escript::DataLazy::m_readytype [private] |
Referenced by actsExpanded(), collapse(), collapseToReady(), DataLazy(), getPointOffset(), makeIdentity(), resolveNodeNP1OUT(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNodeSample(), resolveNodeUnary(), resolveNodeWorker(), resolveNP1OUT(), resolveNP1OUT_2P(), resolveNP1OUT_P(), resolveUnary(), resolveVectorSample(), and resolveVectorWorker().
int escript::DataLazy::m_axis_offset [private] |
Referenced by collapseToReady(), deepCopy(), intoString(), makeIdentity(), resolveNodeNP1OUT_2P(), resolveNodeNP1OUT_P(), resolveNP1OUT_2P(), and resolveNP1OUT_P().
int escript::DataLazy::m_transpose [private] |
Referenced by collapseToReady(), deepCopy(), intoString(), makeIdentity(), resolveNodeNP1OUT_2P(), resolveNodeTProd(), resolveNP1OUT_2P(), and resolveTProd().
int escript::DataLazy::m_SL [private] |
Referenced by makeIdentity(), resolveNodeTProd(), and resolveTProd().
int escript::DataLazy::m_SM [private] |
Referenced by makeIdentity(), resolveNodeTProd(), and resolveTProd().
int escript::DataLazy::m_SR [private] |
Referenced by makeIdentity(), resolveNodeTProd(), and resolveTProd().
double escript::DataLazy::m_tol [private] |
Referenced by collapseToReady(), resolveNodeUnary(), and resolveUnary().
size_t escript::DataLazy::m_maxsamplesize [private] |
Referenced by DataLazy(), getMaxSampleSize(), getSampleBufferSize(), makeIdentity(), and resolveVectorWorker().
size_t escript::DataLazy::m_children [private] |
Referenced by DataLazy().
size_t escript::DataLazy::m_height [private] |
Referenced by DataLazy(), and makeIdentity().
int* escript::DataLazy::m_sampleids [private] |
Referenced by LazyNodeSetup(), resolveNodeSample(), and ~DataLazy().
DataVector escript::DataLazy::m_samples [private] |