MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / setZero

Function setZero

extensions/include/cuMat/src/Matrix.h:1232–1238  ·  view source on GitHub ↗

STATIC METHODS AND OTHER HELPERS * \brief Sets all entries to zero. * Warning: this operation works in-place and therefore violates the copy-on-write paradigm. */

Source from the content-addressed store, hash-verified

1230 * Warning: this operation works in-place and therefore violates the copy-on-write paradigm.
1231 */
1232 void setZero()
1233 {
1234 Index s = size();
1235 if (s > 0) {
1236 CUMAT_SAFE_CALL(cudaMemsetAsync(data(), 0, sizeof(_Scalar) * size(), Context::current().stream()));
1237 }
1238 }
1239
1240#include "MatrixNullaryOpsPlugin.inl"
1241#include "MatrixBlockPluginLvalue.inl"

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.85
dataFunction · 0.85
streamMethod · 0.80

Tested by

no test coverage detected