Last change
on this file since 2118 was
2004,
checked in by ymipsl, 4 years ago
|
fix typo.
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[1997] | 1 | #include "algorithm_transformation_transfer.hpp" |
---|
| 2 | #include "array_new.hpp" |
---|
| 3 | #include "local_view.hpp" |
---|
| 4 | #include "transform_connector.hpp" |
---|
| 5 | #include "context.hpp" |
---|
| 6 | |
---|
| 7 | namespace xios |
---|
| 8 | { |
---|
| 9 | |
---|
[2001] | 10 | void CAlgorithmTransformationTransfer::computeAlgorithm(CLocalView* srcView, CLocalView* dstView) |
---|
| 11 | { |
---|
| 12 | this->computeRecvElement(srcView, dstView) ; |
---|
[2004] | 13 | transferTransformConnector_ = new CTransferTransformConnector( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_) ; |
---|
[1997] | 14 | } |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | void CAlgorithmTransformationTransfer::apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut) |
---|
| 18 | { |
---|
[2003] | 19 | transferTransformConnector_ -> transfer(dimBefore, dimAfter, dataIn, dataOut) ; |
---|
[1997] | 20 | } |
---|
| 21 | |
---|
[1999] | 22 | void CAlgorithmTransformationTransfer::computeRecvElement(CLocalView* srcView, CLocalView* dstView) |
---|
| 23 | { |
---|
| 24 | set<size_t> srcIndex ; |
---|
| 25 | for(auto& it : transformationMapping_) srcIndex.insert(it.second) ; |
---|
| 26 | |
---|
| 27 | CArray<size_t,1> srcArrayIndex(srcIndex.size()) ; |
---|
| 28 | int i=0 ; |
---|
| 29 | for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;} |
---|
| 30 | recvElement_ = new CLocalElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ; |
---|
| 31 | recvElement_->addFullView() ; |
---|
| 32 | } |
---|
| 33 | |
---|
[1997] | 34 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.