mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
Thread loop constructs changing a little
This commit is contained in:
@ -30,7 +30,6 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#include <Hadrons/TimerArray.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
#define TIME_MOD(t) (((t) + par.global.nt) % par.global.nt)
|
||||
@ -353,11 +352,12 @@ int main(int argc, char* argv[])
|
||||
|
||||
tAr.startTimer("Transpose caching");
|
||||
lastTerm[t].resize(ref.rows(), ref.cols());
|
||||
thread_loop( (unsigned int j = 0; j < ref.cols(); ++j),
|
||||
for (unsigned int i = 0; i < ref.rows(); ++i)
|
||||
{
|
||||
lastTerm[t](i, j) = ref(i, j);
|
||||
});
|
||||
thread_for( j,ref.cols(),{
|
||||
for (unsigned int i = 0; i < ref.rows(); ++i)
|
||||
{
|
||||
lastTerm[t](i, j) = ref(i, j);
|
||||
}
|
||||
});
|
||||
tAr.stopTimer("Transpose caching");
|
||||
}
|
||||
bytes = par.global.nt*lastTerm[0].rows()*lastTerm[0].cols()*sizeof(ComplexD);
|
||||
|
@ -205,7 +205,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
auto nr = a.rows(), nc = a.cols();
|
||||
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int i = 0; i < nr; ++i),
|
||||
thread_for(i,nr,
|
||||
{
|
||||
ComplexD tmp = 0.;
|
||||
|
||||
@ -225,7 +225,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
auto nr = a.rows(), nc = a.cols();
|
||||
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int j = 0; j < nc; ++j),
|
||||
thread_for(j,nc,
|
||||
{
|
||||
ComplexD tmp = 0.;
|
||||
|
||||
@ -248,7 +248,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
[](ComplexD &res, const MatLeft &a, const MatRight &b)
|
||||
{
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int r = 0; r < a.rows(); ++r),
|
||||
thread_for(r,a.rows(),
|
||||
{
|
||||
ComplexD tmp;
|
||||
|
||||
@ -263,7 +263,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
[](ComplexD &res, const MatLeft &a, const MatRight &b)
|
||||
{
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int c = 0; c < a.cols(); ++c),
|
||||
thread_for(c,a.cols(),
|
||||
{
|
||||
ComplexD tmp;
|
||||
|
||||
@ -284,7 +284,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
[](ComplexD &res, const MatLeft &a, const MatRight &b)
|
||||
{
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int r = 0; r < a.rows(); ++r),
|
||||
thread_for(r,a.rows()
|
||||
{
|
||||
ComplexD tmp;
|
||||
|
||||
@ -299,7 +299,7 @@ void fullTrBenchmark(const unsigned int ni, const unsigned int nj, const unsigne
|
||||
[](ComplexD &res, const MatLeft &a, const MatRight &b)
|
||||
{
|
||||
res = 0.;
|
||||
thread_loop( (unsigned int c = 0; c < a.cols(); ++c),
|
||||
thread_for(c,a.cols(),
|
||||
{
|
||||
ComplexD tmp;
|
||||
|
||||
|
@ -29,7 +29,6 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#include <Hadrons/Environment.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
template <typename FOut, typename FIn>
|
||||
|
Reference in New Issue
Block a user