1 #ifndef VIENNACL_TOOLS_SHARED_PTR_HPP
2 #define VIENNACL_TOOLS_SHARED_PTR_HPP
46 unsigned int val(){
return val_; }
62 template<
class U,
class Deleter>
95 template<
class U,
class Deleter>
96 shared_ptr(U* pu, Deleter d) : pa(new detail::auximpl<U, Deleter>(pu, d)), pt(pu) {}
99 explicit shared_ptr(U* pu) : pa(new detail::auximpl<U, detail::default_deleter<U> >(pu, detail::default_deleter<U>())), pt(pu) {}
101 T*
get()
const {
return pt; }
179 #endif // VIENNACL_UTILS_SHARED_PTR_HPP
viennacl::enable_if< viennacl::is_scalar< ScalarT1 >::value &&viennacl::is_scalar< ScalarT2 >::value >::type swap(ScalarT1 &s1, ScalarT2 &s2)
Swaps the contents of two scalars, data is copied.