这篇教程C++ G函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中G函数的典型用法代码示例。如果您正苦于以下问题:C++ G函数的具体用法?C++ G怎么用?C++ G使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了G函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: luaS_freeall#include "lmem.h"#include "lobject.h"#include "lstate.h"#include "lstring.h"void luaS_freeall (lua_State *L) { lua_assert(G(L)->strt.nuse==0); luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size, TString *);}void luaS_resize (lua_State *L, int newsize) { GCObject **newhash = luaM_newvector(L, newsize, GCObject *); stringtable *tb = &G(L)->strt; int i; for (i=0; i<newsize; i++) newhash[i] = NULL; /* rehash */ for (i=0; i<tb->size; i++) { GCObject *p = tb->hash[i]; while (p) { /* for each node in the list */ GCObject *next = p->gch.next; /* save next */ lu_hash h = gcotots(p)->tsv.hash; int h1 = lmod(h, newsize); /* new position */ lua_assert(cast(int, h%newsize) == lmod(h, newsize)); p->gch.next = newhash[h1]; /* chain it */ newhash[h1] = p; p = next; } }
开发者ID:wesz,项目名称:gusanos,代码行数:31,
示例2: ASJ#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE ASJ( jmp, 5, f) ASL(4) // non-SSE2#endif AS2( add [AS_REG_7+0*4], ecx) // A AS2( add [AS_REG_7+4*4], edi) // E AS2( mov eax, B(0)) AS2( mov ebx, C(0)) AS2( mov ecx, D(0)) AS2( add [AS_REG_7+1*4], eax) AS2( add [AS_REG_7+2*4], ebx) AS2( add [AS_REG_7+3*4], ecx) AS2( mov eax, F(0)) AS2( mov ebx, G(0)) AS2( mov ecx, H(0)) AS2( add [AS_REG_7+5*4], eax) AS2( add [AS_REG_7+6*4], ebx) AS2( add [AS_REG_7+7*4], ecx) AS2( mov ecx, AS_REG_7d) AS2( cmp WORD_REG(dx), DATA_END) ASJ( jb, 2, b)#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE ASL(5)#endif#endif AS_POP_IF86(sp) AS_POP_IF86(bp) #if !defined(_MSC_VER) || (_MSC_VER < 1400)
开发者ID:YuanKQ,项目名称:NFD_for_android,代码行数:30,
示例3: lua_closeLUA_API void lua_close (lua_State *L) { L = G(L)->mainthread; /* only the main thread can be closed */ lua_lock(L); close_state(L);}
开发者ID:RBACS,项目名称:KnightOnline-Projectv1886,代码行数:5,
示例4: luaC_sweepvoid luaC_sweep (lua_State *L, int all) { if (all) all = 256; /* larger than any mark */ sweeplist(L, &G(L)->rootudata, all); sweepstrings(L, all); sweeplist(L, &G(L)->rootgc, all);}
开发者ID:segafan,项目名称:wme1_jankavan_tlc_edition-repo,代码行数:6,
示例5: Kou_Ap_Am static int Kou_Ap_Am(double S0,NumFunc_1 *P,double T,double r,double divid,double sigma,double lambda,double lambdap,double lambdam,double p,double *ptPrice,double *ptDelta) { double K=P->Par[0].Val.V_DOUBLE; long double x[12]={sigma,lambda,p,lambdap,lambdam,S0,K,r,T,divid,0,0},temp,eps1=1e-6,un=1.0L,q=1-p; if ((P->Compute)==&Call) { //On utilise la dualit C++ GAErr函数代码示例 C++ Fwrite函数代码示例
|