Unified-memory hints (advisory; no-ops in the single-address-space sim)#

The sim keeps host and device in one address space, so prefetching and advice change nothing — they exist only so unified-memory code COMPILES and RUNS.

Defined in code/simulator.h.

This page documents 7 symbols: 1 macros, 2 enums, 4 functions.

Macros#

Signature

Description

Availability

Location

Example

cudaCpuDeviceId(-1)

The sim keeps host and device in one address space, so prefetching and advice change nothing — they exist only so unified-memory code COMPILES and RUNS.

sim only

simulator.h:2191

Enums#

Signature

Description

Availability

Location

Example

enum cudaMemLocationType

CUDA 13 replaced the int-device argument with a cudaMemLocation struct; accept that spelling too so the same source compiles under CUDA 13 nvcc and the sim.

sim only

simulator.h:2207

enum cudaMemoryAdvise

sim only

simulator.h:2193

Functions#

Signature

Description

Availability

Location

Example

inline cudaError_t cudaMemAdvise(const void* , size_t , cudaMemoryAdvise , int )

sim only

simulator.h:2201

inline cudaError_t cudaMemAdvise(const void* , size_t , cudaMemoryAdvise , cudaMemLocation )

sim only

simulator.h:2214

inline cudaError_t cudaMemPrefetchAsync(const void* , size_t , int , cudaStream_t = nullptr)

sim only

simulator.h:2203

inline cudaError_t cudaMemPrefetchAsync(const void* , size_t , cudaMemLocation , unsigned = 0, cudaStream_t = nullptr)

sim only

simulator.h:2212