corrections in TFor
This commit is contained in:
parent
b0d002b7b1
commit
b47000d015
1 changed files with 8 additions and 6 deletions
|
@ -144,14 +144,15 @@ namespace CNORXZ
|
||||||
inline SizeT TFor<L,PosT,Xpr>::operator()(const PosT1& mlast, const PosT2& last) const
|
inline SizeT TFor<L,PosT,Xpr>::operator()(const PosT1& mlast, const PosT2& last) const
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
#pragma omp parallel shared(mXpr) private(i)
|
const int size = static_cast<int>(mSize);
|
||||||
|
#pragma omp parallel
|
||||||
{
|
{
|
||||||
auto xpr = mXpr;
|
auto xpr = mXpr;
|
||||||
#pragma omp for
|
#pragma omp for
|
||||||
for(i = 0; i < mSize; i++){
|
for(i = 0; i < size; i++){
|
||||||
const auto mpos = mlast + mStep * UPos(i);
|
const auto mpos = mlast + mStep * UPos(i);
|
||||||
const auto pos = last + mExt * UPos(i);
|
const auto pos = last + mExt * UPos(i);
|
||||||
mXpr(mpos, pos);
|
xpr(mpos, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -161,14 +162,15 @@ namespace CNORXZ
|
||||||
inline SizeT TFor<L,PosT,Xpr>::operator()() const
|
inline SizeT TFor<L,PosT,Xpr>::operator()() const
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
#pragma omp parallel shared(mXpr) private(i)
|
const int size = static_cast<int>(mSize);
|
||||||
|
#pragma omp parallel
|
||||||
{
|
{
|
||||||
auto xpr = mXpr;
|
auto xpr = mXpr;
|
||||||
#pragma omp for
|
#pragma omp for
|
||||||
for(i = 0; i < static_cast<int>(mSize); i++){
|
for(i = 0; i < size; i++){
|
||||||
const auto mpos = mStep * UPos(i);
|
const auto mpos = mStep * UPos(i);
|
||||||
const auto pos = mExt * UPos(i);
|
const auto pos = mExt * UPos(i);
|
||||||
mXpr(mpos, pos);
|
xpr(mpos, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue