KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
GenericPlatformMemory.h File Reference

This file contains the FGenericPlatformMemory for general purpose memory operations. More...

#include "krpch.h"
Include dependency graph for GenericPlatformMemory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Karma::SelectIntPointerType< T32BITS, T64BITS, PointerSize >
 Defaulter for sized different from 4 and 8. Meaning not supporting 16 bit systems. More...
 
struct  Karma::SelectIntPointerType< T32BITS, T64BITS, 8 >
 For selecting 64 bit type. More...
 
struct  Karma::SelectIntPointerType< T32BITS, T64BITS, 4 >
 For selecting 32 bit type. More...
 
struct  Karma::FGenericPlatformMemory
 Base class for Platform based memory operations. More...
 

Typedefs

typedef size_t Karma::SIZE_T
 
typedef SelectIntPointerType< uint32_t, uint64_t, sizeof(void *)>::TIntPointer Karma::UPTRINT
 

Enumerations

enum class  Karma::EMemcpyCachePolicy : uint8_t { StoreCached , StoreUncached }
 

Detailed Description

This file contains the FGenericPlatformMemory for general purpose memory operations.

Author
Ravi Mohan (the_cowboy)
Version
1.0
Date
March 8, 2023

Typedef Documentation

◆ UPTRINT

typedef SelectIntPointerType<uint32_t,uint64_t,sizeof(void*)>::TIntPointer Karma::UPTRINT

A typedef for selecting between 32 bit and 64 bit uint based upon the architecture

Note
In 16-bit systems, the size of a void pointer is 2 bytes. In a 32-bit system, the size of a void pointer is 4 bytes. And, in a 64-bit system, the size of a void pointer is 8 bytes.
Since
Karma 1.0.0

Enumeration Type Documentation

◆ EMemcpyCachePolicy

enum class Karma::EMemcpyCachePolicy : uint8_t
strong
Enumerator
StoreCached 

Writes to destination memory are cache-visible (default).

Remarks
This should be used if copy results are immediately accessed by CPU.
StoreUncached 

Writes to destination memory bypass cache (avoiding pollution).

Remarks
Optimizes for large copies that aren't read from soon after.