本文整理汇总了C++中U64函数的典型用法代码示例。如果您正苦于以下问题:C++ U64函数的具体用法?C++ U64怎么用?C++ U64使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了U64函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SET_CONDITION_CODES
INLINE void SET_CONDITION_CODES(m68ki_cpu_core *m68k, fp_reg reg)
{
REG_FPSR &= ~(FPCC_N|FPCC_Z|FPCC_I|FPCC_NAN);
// sign flag
if (reg.i & U64(0x8000000000000000))
{
REG_FPSR |= FPCC_N;
}
// zero flag
if ((reg.i & U64(0x7fffffffffffffff)) == 0)
{
REG_FPSR |= FPCC_Z;
}
// infinity flag
if ((reg.i & U64(0x7fffffffffffffff)) == DOUBLE_INFINITY)
{
REG_FPSR |= FPCC_I;
}
// NaN flag
if (((reg.i & DOUBLE_EXPONENT) == DOUBLE_EXPONENT) && ((reg.i & DOUBLE_MANTISSA) != 0))
{
REG_FPSR |= FPCC_NAN;
}
}
示例2: WRITE64_HANDLER
static WRITE64_HANDLER(reset_w)
{
if (!(mem_mask & U64(0xffffffff00000000)))
{
if (data & U64(0x100000000))
{
cpunum_set_input_line(0, INPUT_LINE_RESET, PULSE_LINE);
unk3 = 0;
}
}
}
示例3: U64
// Hash key of the FEN
Key Zob::compute_fen_key (const string &fen, bool c960) const
{
if (fen.empty ()) return U64 (0);
Key fen_key = U64 (0);
File king[CLR_NO] = {F_NO};
istringstream sfen (fen);
uint8_t ch;
sfen >> noskipws;
uint32_t idx;
Square s = SQ_A8;
while ((sfen >> ch) && !isspace (ch))
{
if (isdigit (ch))
{
s += Delta (ch - '0'); // Advance the given number of files
}
else if (isalpha (ch) && (idx = CharPiece.find (ch)) != string::npos)
{
Piece p = Piece (idx);
fen_key ^= _.psq_k[_color (p)][_ptype (p)][s];
++s;
}
else if (ch == '/')
{
s += DEL_SS;
}
}
sfen >> ch;
if ('w' == ch) fen_key ^= _.mover_side;
sfen >> ch;
if (c960)
{
while ((sfen >> ch) && !isspace (ch))
{
Color c = isupper (ch) ? WHITE : BLACK;
uint8_t sym = tolower (ch);
if ('a' <= sym && sym <= 'h')
{
fen_key ^= _.castle_right[c][(king[c] < to_file (sym)) ? CS_K : CS_Q];
}
else
{
return U64 (0);
}
}
}
else
{
while ((sfen >> ch) && !isspace (ch))
示例4: read_uint64
UINT64 read_uint64(FILE *infile)
{
UINT64 res0 = U64(0), res1 = U64(0);
UINT64 res;
unsigned char buffer[8];
fread(buffer, 8, 1, infile);
res0 = buffer[3] | buffer[2]<<8 | buffer[1]<<16 | buffer[0]<<24;
res1 = buffer[7] | buffer[6]<<8 | buffer[5]<<16 | buffer[4]<<24;
res = res0<<32 | res1;
return res;
}
示例5: FInitHashe
bool FInitHashe(PCON pcon)
{
if( hashBuffer ) {
free( hashBuffer );
hashBuffer = 0;
}
s_chashdMac = 15;
int cbMaxHash = uciHash.get_spin();
if( cbMaxHash <= 0 || cbMaxHash > 1024 )
cbMaxHash = 32;
cbMaxHash *= 1024*1024;
chashdMax = 1;
for (;;) {
if (chashdMax * 2 * (int)sizeof(HASHD) > cbMaxHash)
break;
chashdMax *= 2;
}
VPrSendComment("%d Kbytes main hash memory (%d entries)", chashdMax * sizeof(HASHD) / 1024, chashdMax);
Assert( sizeof(HASHD) == 16 );
hashBuffer = (RGHASHD) malloc( 64 + chashdMax * sizeof(HASHD));
if ( hashBuffer == NULL) {
VPrSendComment("Can't allocate hash memory: %d bytes",
chashdMax * sizeof(HASHD));
return false;
}
s_rghashd = (RGHASHD) ((U64(hashBuffer)+63) & (~63));
s_chashdMac = ((chashdMax / BUCKET_SIZE) - 1) * BUCKET_SIZE;
stats.Hsize = chashdMax;
VClearHashe();
return true;
}
示例6: mach_timebase_info
// ================================================================================================
// Static method that needs to be called before any timing can be done
// ================================================================================================
void Timer::StaticInit() {
#ifdef __MACH__
mach_timebase_info_data_t info;
mach_timebase_info(&info);
sFreq = U64(1000000000.0 * F64(info.denom) / F64(info.numer) + 0.5);
#endif
}
示例7: U64
void Statistics::accumulateDistance(F32 dist)
{
// We'll track distance as an integer to avoid data loss due to a small float being added to a big one.
// Not that precision is important; it isn't... but rather to avoid appearance of "going no further" once
// you've gone a certain distance.
mDist += U64(dist * DIST_MULTIPLIER);
}
示例8: U64
U64 IRAnalyzer::DecodeAddr(U64 sample, U8 j, IRAnalyzerResults::TypeFrame type)
{
U8 addr = 0xFF;
U64 ntick, mtick, first, tt;
first = sample;
tt = sample;
for( U8 i=0; i<j; i++ )
{
mSerial->AdvanceToNextEdge();
ntick = mSerial->GetSampleNumber();
mtick = U64((ntick - tt)*1000000/mSampleRateHz);
if (mtick > 400 && mtick < 700)
{
addr ^= (1 << (7-i));
}
mSerial->AdvanceToNextEdge();
tt = mSerial->GetSampleNumber();
}
Frame frame;
frame.mData1 = j | type;
frame.mData2 = reverse(addr);
frame.mFlags = 0;
frame.mStartingSampleInclusive = first;
frame.mEndingSampleInclusive = tt;
mResults->AddFrame( frame );
mResults->CommitResults();
ReportProgress( frame.mEndingSampleInclusive );
return tt;
}
示例9: assert
/**
* brief:
*
* @returns
*/
void RespProcessor::doIt()
{
char buffer[16*1024] = {'\0'};
ResponseManager* pRespMgr = ResponseManager::getInstance();
assert(NULL != pRespMgr);
while(true)
{
CmdTask resp;
bool ret = pRespMgr->getRespTask(resp);
if(!ret)
{
LOG4CPLUS_WARN(CLogger::logger, "response array is empty.");
continue;
}
SessionBase* pSession = _sess_mgr_prt->getSession(resp.seqno);
if(NULL == pSession)
{
LOG4CPLUS_ERROR(CLogger::logger, "can't find the session by " << resp.seqno);
delete resp.pCmd;
resp.pCmd = NULL;
continue;
}
int64_t uid = resp.pCmd->get_userid();
string name = resp.pCmd->get_cmd_name();
memset(buffer, '\0', 16 * 1024);
int length = resp.pCmd->header_length() + resp.pCmd->body_length();
ret = resp.pCmd->encode((byte*)buffer, length);
resp.releaseCmd();
if(!ret)
{
LOG4CPLUS_ERROR(CLogger::logger, "command encode failed for " << name);
continue;
}
pSession->write2Send(string(buffer, length));
int iret = pSession->sendBuffer();
uint64_t data = U64(resp.seqno, pSession->getFd());
if(SOCKET_EAGAIN == iret) //socket»º³åÇøдÂú
{
_epoll_svr_ptr->notify(pSession->getFd(), data, EVENT_WRITE);
}
else if(SOCKET_ERR == iret) //socket ³ö´í
{
_epoll_svr_ptr->notify(pSession->getFd(), data, EVENT_ERROR);
_sess_mgr_prt->freeSession(pSession);
_client_mgr_prt->freeClient(uid, resp.seqno);
}
LOG4CPLUS_INFO(CDebugLogger::logger, "TimeTace: request[" << resp.idx << "] to response["
<< name << "] spend time " << current_time_usec() - resp.timestamp);
Index::free(resp.idx);
}
}
示例10: READ64_HANDLER
static READ64_HANDLER(unk4_r)
{
if (!(mem_mask & U64(0xffffffff00000000)))
{
return ((UINT64)0 << (13+32)) | ((UINT64)5 << (10+32));
}
return 0;
}
示例11: propagateFloatx80NaNOneArg
INLINE floatx80 propagateFloatx80NaNOneArg(floatx80 a)
{
if (floatx80_is_signaling_nan(a))
float_raise(float_flag_invalid);
a.low |= U64(0xC000000000000000);
return a;
}
示例12: U64
U64 LLFastTimer::countsPerSecond()
{
if (!sCPUClockFrequency)
{
CProcessor proc;
sCPUClockFrequency = proc.GetCPUFrequency(50);
}
return U64(sCPUClockFrequency);
}
示例13: scudsp_get_source_mem_value
uint32_t scudsp_cpu_device::scudsp_get_source_mem_reg_value( uint32_t mode )
{
if ( mode < 0x8 )
{
return scudsp_get_source_mem_value( mode );
}
else
{
switch( mode )
{
case 0x9:
return (uint32_t)((m_alu & U64(0x00000000ffffffff)) >> 0);
case 0xA:
return (uint32_t)((m_alu & U64(0x0000ffffffff0000)) >> 16);
}
}
return 0;
}
示例14: FreeFilter
static void FreeFilter(ALCdevice *device, ALfilter *filter)
{
ALuint id = filter->id - 1;
ALsizei lidx = id >> 6;
ALsizei slidx = id & 0x3f;
memset(filter, 0, sizeof(*filter));
VECTOR_ELEM(device->FilterList, lidx).FreeMask |= U64(1) << slidx;
}
示例15: FreeEffect
static void FreeEffect(ALCdevice *device, ALeffect *effect)
{
ALuint id = effect->id - 1;
ALsizei lidx = id >> 6;
ALsizei slidx = id & 0x3f;
memset(effect, 0, sizeof(*effect));
VECTOR_ELEM(device->EffectList, lidx).FreeMask |= U64(1) << slidx;
}