4 #define cpuMalloc(ptr,nbBytes) ptr = (decltype(ptr)) malloc(nbBytes) 6 #define protoMallocCPU(PTR,NBYTES) storeMemInfo(Proto::HOST,NBYTES); countMallocHost(cpuMalloc(PTR, NBYTES)) 7 #define protoFreeCPU(PTR) free(PTR) 10 #define protoHostAlloc(a,b) storeMemInfo(Proto::HOST,b); countMallocHost(cpuMalloc(a, b)) 11 #define protoFreeHost(PTR) free(PTR) 14 #define protoHostAlloc(a,b) storeMemInfo(Proto::HOST,b); countMallocHost(hipHostMalloc(&a, b)) 15 #define protoFreeHost(PTR) hipHostFree(PTR) 17 #define protoHostAlloc(a,b) storeMemInfo(Proto::HOST,b); countMallocHost(cudaMallocHost(&a, b)) 18 #define protoFreeHost(PTR) cudaFreeHost(PTR) 25 #define protoMemcpyDeviceToDevice false 26 #define protoMemcpyHostToDevice false 27 #define protoMemcpyDeviceToHost false 35 #define protoMemcpyCPU(to,from,size,copyType) std::memcpy(to,from,size) 36 #define protoMemcpyAsyncCPU(to,from,size,copyType,stream) std::memcpy(to,from,size) 37 #define protoMemcpyFromSymbolCPU(a,b,c,d,e) std::memcpy(a,b,c) 38 #define protoMemcpyToSymbolCPU(a,b,c,d,e) std::memcpy(a,b,c) 48 #define protoDeviceSynchronizeCPU()