MCPcopy Create free account
hub / github.com/clab/dynet / constant_dev

Method constant_dev

dynet/tensor.cc:377–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375
376template <class MyDevice>
377void TensorTools::constant_dev(const MyDevice & dev, Tensor& d, float c) {
378 tvec(d).device(*dev.edevice) = tvec(d).constant(c);
379}
380#ifdef __CUDACC__
381template void TensorTools::constant_dev<Device_GPU>(const Device_GPU & dev, Tensor& d, float c);
382#else

Callers

nothing calls this directly

Calls 2

tvecFunction · 0.85
constantMethod · 0.80

Tested by

no test coverage detected