mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
SYCLL maknig happy - must avoid non ttrivial copy constructors
This commit is contained in:
parent
cb0d1b3399
commit
7bc0166c1c
@ -217,8 +217,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
|
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
|
||||||
auto me = View(AcceleratorWriteDiscard);
|
auto me = View(CpuWrite);
|
||||||
accelerator_for(ss,me.size(),1,{
|
thread_for(ss,me.size(),{
|
||||||
me[ss]= r;
|
me[ss]= r;
|
||||||
});
|
});
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -107,10 +107,18 @@ class MemViewDeleter {
|
|||||||
template<class vobj>
|
template<class vobj>
|
||||||
class LatticeView : public LatticeExprView<vobj>
|
class LatticeView : public LatticeExprView<vobj>
|
||||||
{
|
{
|
||||||
|
#ifndef GRID_UVM
|
||||||
std::shared_ptr<MemViewDeleter> Deleter;
|
std::shared_ptr<MemViewDeleter> Deleter;
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
LatticeView(const LatticeView<vobj> &orig) : LatticeExprView<vobj>(orig) { }
|
#ifdef GRID_UVM
|
||||||
LatticeView(const LatticeAccelerator<vobj> &refer_to_me,ViewMode mode) :
|
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)
|
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;
|
// 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->cpu_ptr = this->cpu_ptr;
|
||||||
Deleter->mode = mode;
|
Deleter->mode = mode;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user