| 285 | // it uses RMM underneath to allocate the space. |
| 286 | |
| 287 | void *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 |
nothing calls this directly
no test coverage detected