diff --git a/include/hsakmttypes.h b/include/hsakmttypes.h index 5b4eeba1e1..75fbcb7a58 100644 --- a/include/hsakmttypes.h +++ b/include/hsakmttypes.h @@ -469,6 +469,36 @@ typedef struct _HsaMemFlags }; } HsaMemFlags; +typedef struct _HsaMemMapFlags +{ + union + { + struct + { + unsigned int Reserved1 : 1; // + unsigned int CachePolicy : 4; // see HSA_CACHING_TYPE + unsigned int ReadOnly : 1; // memory is not modified while mapped + // allows migration scale-out + unsigned int PageSize : 2; // see HSA_PAGE_SIZE, hint to use + // this page size if possible and + // smaller than default + unsigned int HostAccess : 1; // default = 0: GPU access only + unsigned int Migrate : 1; // Hint: Allows migration to local mem + // of mapped GPU(s), instead of mapping + // physical location + unsigned int Probe : 1; // default = 0: Indicates that a range + // will be mapped by the process soon, + // but does not initiate a map operation + // may trigger eviction of nonessential + // data from the memory, reduces latency + // “cleanup hint” only, may be ignored + unsigned int Reserved : 21; + }; + HSAuint32 Value; + }; +} HsaMemMapFlags; + + typedef enum _HSA_CACHING_TYPE { HSA_CACHING_CACHED = 0,