Re: [ViennaCL-devel] Shared pointer troubles

2013-12-20 Thread Toby St Clere Smithe
Hey Philippe, Philippe Tillet writes: > I wrote the shared_ptr some years ago (inspired by some code found on the > internet), so it's not impossible that a couple of bugs sneaked in. The > first thing to do is to use C++11 and to replace the whole content of > viennacl/tools/shared_ptr.hpp by: >

Re: [ViennaCL-devel] Shared pointer troubles

2013-12-20 Thread Philippe Tillet
Hey Toby, I wrote the shared_ptr some years ago (inspired by some code found on the internet), so it's not impossible that a couple of bugs sneaked in. The first thing to do is to use C++11 and to replace the whole content of viennacl/tools/shared_ptr.hpp by: template using shared_ptr = std::shar

Re: [ViennaCL-devel] Shared pointer troubles

2013-12-20 Thread Toby St Clere Smithe
Toby St Clere Smithe writes: > So having split up my sources, I'm having trouble with shared > pointers. It seems that because of the way the sources have been split > into a number of functions, some pointer goes out of scope and gets > dereferenced twice.. I'm not sure the problem is in ViennaCL

[ViennaCL-devel] Shared pointer troubles

2013-12-20 Thread Toby St Clere Smithe
So having split up my sources, I'm having trouble with shared pointers. It seems that because of the way the sources have been split into a number of functions, some pointer goes out of scope and gets dereferenced twice.. I'm not sure the problem is in ViennaCL, but something tricky is happening he