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

Function up

engine/src/kernels/native_multi_parity.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36template <typename T>
37T* up(const std::vector<T>& h) {
38 void* p = nullptr;
39 check(cudaMalloc(&p, h.size() * sizeof(T) + 64), "malloc");
40 check(cudaMemcpy(p, h.data(), h.size() * sizeof(T), cudaMemcpyHostToDevice), "h2d");
41 return (T*) p;
42}
43template <typename T>
44std::vector<T> down(const T* d, size_t n) {
45 std::vector<T> h(n);

Callers 1

mainFunction · 0.70

Calls 5

checkFunction · 0.70
cudaMallocFunction · 0.50
cudaMemcpyFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected