MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / rmm_wrap_calloc

Function rmm_wrap_calloc

deps/GraphBLAS/rmm_wrap/rmm_wrap.cpp:287–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285// it uses RMM underneath to allocate the space.
286
287void *rmm_wrap_calloc (std::size_t n, std::size_t size)
288{
289 std::size_t s = n * size ;
290 void *p = rmm_wrap_allocate (&s) ;
291 // NOTE: this is single-threaded on the CPU. If you want a faster method,
292 // malloc the space and use cudaMemset for the GPU or GB_memset on the CPU.
293 // The GraphBLAS GB_calloc_memory method uses malloc and GB_memset.
294 memset (p, 0, s) ;
295 return (p) ;
296}
297
298//------------------------------------------------------------------------------
299// rmm_wrap_realloc: realloc-equivalent method using RMM

Callers

nothing calls this directly

Calls 1

rmm_wrap_allocateFunction · 0.85

Tested by

no test coverage detected