MCPcopy Create free account
hub / github.com/Niko1221/Strata / dalloc

Function dalloc

engine/src/kernels/cvec_parity.cpp:34–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template <typename T>
34T* dalloc(size_t n) {
35 T* p = nullptr;
36 ck(cudaMalloc(&p, n * sizeof(T)), "malloc");
37 return p;
38}
39
40template <typename T>
41void up(T* d, const std::vector<T>& h) { ck(cudaMemcpy(d, h.data(), h.size() * sizeof(T), cudaMemcpyHostToDevice), "up"); }

Callers

nothing calls this directly

Calls 2

ckFunction · 0.70
cudaMallocFunction · 0.50

Tested by

no test coverage detected