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

Method init

engine/src/core/mtp.cpp:1040–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038 on = e != nullptr && e[0] == '1';
1039 }
1040 void init() {
1041 if (!on || d != nullptr) return;
1042 if (cudaMalloc((void**) &d, (size_t) kMpSlots * kMpGraphs * 8) != cudaSuccess) { on = false; d = nullptr; (void) cudaGetLastError(); return; }
1043 cudaMemset(d, 0, (size_t) kMpSlots * kMpGraphs * 8);
1044 h.assign((size_t) kMpSlots * kMpGraphs, 0);
1045 }
1046 void stamp(int i, cudaStream_t cs) const {
1047 if (on && d != nullptr && base >= 0) strata::kernels::gpu_stamp(d, base * kMpSlots + i, cs);
1048 }

Callers 3

capture_roundMethod · 0.45
capture_stepMethod · 0.45
draftMethod · 0.45

Calls 4

assignMethod · 0.80
cudaMallocFunction · 0.50
cudaGetLastErrorFunction · 0.50
cudaMemsetFunction · 0.50

Tested by

no test coverage detected