first commit
This commit is contained in:
36
include/platform/memory/memory.h
Normal file
36
include/platform/memory/memory.h
Normal file
@ -0,0 +1,36 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __NMEMORY__
|
||||
#define __NMEMORY__
|
||||
|
||||
|
||||
#include "ntypes.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace Memory {
|
||||
|
||||
/// Return smallest number of bits that can be used to represent a value.
|
||||
uchar GetBitCount(int);
|
||||
/// Return the position in bit of the first non-zero bit.
|
||||
uchar GetShiftCount(int);
|
||||
/// Return the number of bit set in a given value.
|
||||
uchar CountSetBit(int);
|
||||
|
||||
void WriteBit(uchar *, uint offset_in_bit, uint bit_count, uint value);
|
||||
uint ReadBit(uchar *, uint offset_in_bit, uint bit_count);
|
||||
|
||||
bool Compare(const void *, const void *, size_t);
|
||||
void Copy(void *, const void *, size_t);
|
||||
void Set(void *, char, size_t);
|
||||
|
||||
void Fill(void *, const char *pattern, size_t);
|
||||
} // Memory
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NMEMORY__
|
||||
Reference in New Issue
Block a user