1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-05 19:55:56 +01:00

SYCLL maknig happy - must avoid non ttrivial copy constructors

This commit is contained in:
Peter Boyle 2020-05-25 08:34:19 -07:00
parent cb0d1b3399
commit 7bc0166c1c
2 changed files with 13 additions and 4 deletions

View File

@ -217,8 +217,8 @@ public:
}
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
auto me = View(AcceleratorWriteDiscard);
accelerator_for(ss,me.size(),1,{
auto me = View(CpuWrite);
thread_for(ss,me.size(),{
me[ss]= r;
});
return *this;

View File

@ -107,10 +107,18 @@ class MemViewDeleter {
template<class vobj>
class LatticeView : public LatticeExprView<vobj>
{
#ifndef GRID_UVM
std::shared_ptr<MemViewDeleter> Deleter;
#endif
public:
LatticeView(const LatticeView<vobj> &orig) : LatticeExprView<vobj>(orig) { }
LatticeView(const LatticeAccelerator<vobj> &refer_to_me,ViewMode mode) :
#ifdef GRID_UVM
LatticeView(const LatticeAccelerator<vobj> &refer_to_me,ViewMode mode) :
LatticeExprView<vobj> (refer_to_me)
{
}
#else
LatticeView(const LatticeView<vobj> &orig) : LatticeExprView<vobj>(orig) { }
LatticeView(const LatticeAccelerator<vobj> &refer_to_me,ViewMode mode) :
LatticeExprView<vobj> (refer_to_me), Deleter(new MemViewDeleter)
{
// std::cout << "FIXME - copy shared pointer? View Open in LatticeView"<<std::hex<<this->_odata<<std::dec<<" mode "<<mode <<std::endl;
@ -118,6 +126,7 @@ public:
Deleter->cpu_ptr = this->cpu_ptr;
Deleter->mode = mode;
}
#endif
};
/////////////////////////////////////////////////////////////////////////////////////////