We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a66a24f commit ccdb772Copy full SHA for ccdb772
dlib/dnn/tensor.h
@@ -292,15 +292,13 @@ namespace dlib
292
293
resizable_tensor(const resizable_tensor& item) : _annotation(item.annotation())
294
{
295
- // TODO, do the copy with cuda?
296
copy_size(item);
297
- std::memcpy(data_instance.host(), item.host(), data_instance.size()*sizeof(float));
+ memcpy(data_instance, item.data_instance);
298
}
299
resizable_tensor(const tensor& item) : _annotation(item.annotation())
300
301
302
303
+ memcpy(*this, item);
304
305
306
resizable_tensor(resizable_tensor&& item) { swap(item); }
0 commit comments