inline void copy_to_host(std::vector<bool> &out, const dvector<bool> &in) { bool *temp = NULL; try { temp = new bool[in.size()]; in.copy_to_host(temp, in.size()); out.assign(temp, temp + in.size()); delete[] temp; } catch(...) { delete[] temp; throw; } }
void copy_to_host(std::vector<T> &out, const dvector<T> &in) { out.resize(in.size()); in.copy_to_host(&out[0], out.size()); }