您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ F2函数代码示例

51自学网 2021-06-01 20:40:15
  C++
这篇教程C++ F2函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中F2函数的典型用法代码示例。如果您正苦于以下问题:C++ F2函数的具体用法?C++ F2怎么用?C++ F2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了F2函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: W

/* forward octave */static inline void W(u32 *key, unsigned int i) {	u32 I;	key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]);	key[5] ^= F2(key[6], Tr[i % 4][1], Tm[i][1]);	key[4] ^= F3(key[5], Tr[i % 4][2], Tm[i][2]);	key[3] ^= F1(key[4], Tr[i % 4][3], Tm[i][3]);	key[2] ^= F2(key[3], Tr[i % 4][4], Tm[i][4]);	key[1] ^= F3(key[2], Tr[i % 4][5], Tm[i][5]);	key[0] ^= F1(key[1], Tr[i % 4][6], Tm[i][6]);		key[7] ^= F2(key[0], Tr[i % 4][7], Tm[i][7]);}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:12,


示例2: cast5_encrypt

static void cast5_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf){	struct cast5_ctx *c = crypto_tfm_ctx(tfm);	const __be32 *src = (const __be32 *)inbuf;	__be32 *dst = (__be32 *)outbuf;	u32 l, r, t;	u32 I;			/* used by the Fx macros */	u32 *Km;	u8 *Kr;	Km = c->Km;	Kr = c->Kr;	/* (L0,R0) <-- (m1...m64).  (Split the plaintext into left and	 * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.)	 */	l = be32_to_cpu(src[0]);	r = be32_to_cpu(src[1]);	/* (16 rounds) for i from 1 to 16, compute Li and Ri as follows:	 *  Li = Ri-1;	 *  Ri = Li-1 ^ f(Ri-1,Kmi,Kri), where f is defined in Section 2.2	 * Rounds 1, 4, 7, 10, 13, and 16 use f function Type 1.	 * Rounds 2, 5, 8, 11, and 14 use f function Type 2.	 * Rounds 3, 6, 9, 12, and 15 use f function Type 3.	 */	t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]);	t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]);	t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]);	t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]);	t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]);	t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]);	t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]);	t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]);	t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]);	t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]);	t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);	t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);	if (!(c->rr)) {		t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);		t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);		t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);		t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);	}	/* c1...c64 <-- (R16,L16).  (Exchange final blocks L16, R16 and	 *  concatenate to form the ciphertext.) */	dst[0] = cpu_to_be32(r);	dst[1] = cpu_to_be32(l);}
开发者ID:08opt,项目名称:linux,代码行数:51,


示例3: digitalWrite

void ChannelSelector::setCubiePower(bool mode){  if (mode == false) {      digitalWrite(PIN_CUBIEPOWER, LOW);      GLOBALS.cubie_power_enabled = false;      MDISPLAY.showMessage(F2("Power Off"));  }  else {      digitalWrite(PIN_CUBIEPOWER, HIGH);      GLOBALS.cubie_power_enabled = true;      MDISPLAY.showMessage(F2("Power On"));  }}
开发者ID:yodor,项目名称:arduino,代码行数:15,


示例4: q_promote

voidq_promote(    q_expr e){    q_expr leftTerm, rightTerm;    q_expr newTerm;    assert(e != NULL);    assert(e->kind == T_FNC);    assert(e->info.function->tag == Q_EXPR_AND);    leftTerm = q_leftPar(e);    rightTerm = q_rightPar(e);    q_disjunctify(leftTerm);    q_disjunctify(rightTerm);    if (q_isFnc(leftTerm,Q_EXPR_OR)) {        /* e = (A or B) and C ====> e = A and C or B and C */        newTerm = F2(Q_EXPR_AND,q_rightPar(leftTerm),q_exprCopy(rightTerm));        /* e = (A or B) and C; newTerm = B and C */q_promote(newTerm);        q_swapRight(leftTerm,q_swapRight(e,newTerm));        /* e = (A or C) and (B and C); */        q_setTag(leftTerm,Q_EXPR_AND);        /* e = (A and C) and (B and C); */q_promote(leftTerm);        q_setTag(e,Q_EXPR_OR);        /* e = (A and C) or (B and C); */        if (q_isFnc(rightTerm,Q_EXPR_OR)) {            /* e = (A and (C or D)) or (B and (C or D)); */            q_promote(leftTerm);            /* e = (A and C) or (A and D)) or (B and (C or D)); */            q_promote(newTerm);            /* e = ((A and C) or (A and D)) or ((B and C) or (A and D)); */        }    } else {    	if (q_isFnc(rightTerm,Q_EXPR_OR)) {            /* e = A and (B or C) ====> e = A and B or A and C */            newTerm = F2(Q_EXPR_AND,q_exprCopy(leftTerm),q_leftPar(rightTerm));            /* e = A and (B or C); newTerm = A and B */            q_swapLeft(rightTerm,q_swapLeft(e,newTerm));            /* e = (A and B) and (A or C); */            q_setTag(rightTerm,Q_EXPR_AND);            /* e = (A and B) and (A and C); */            q_setTag(e,Q_EXPR_OR);            /* e = (A and B) or (A and C); */    	}    }}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:48,


示例5: rubikStep

void rubikStep(char *step){	u8 m=0;	for(m=0;step[m]!=0;m++)	{		switch(step[m])		{			case 7:allright90();break;			case 11:F1();break;			case 12:F2();break;			case 13:F3();break;			case 21:B1();break;			case 22:B2();break;			case 23:B3();break;			case 31:R1();break;			case 32:R2();break;			case 33:R3();break;			case 41:L1();break;			case 42:L2();break;			case 43:L3();break;			case 51:U1();break;			case 52:U2();break;			case 53:U3();break;			case 61:D1();break;			case 62:D2();break;			case 63:D3();break;			default:break;		}	}}
开发者ID:MrChang0,项目名称:rubik,代码行数:30,


示例6: QBAR

/*reverse quad round*/static inline void QBAR (u32 * block, u8 * Kr, u32 * Km) {	u32 I;        block[3] ^= F1(block[0], Kr[3], Km[3]);        block[0] ^= F3(block[1], Kr[2], Km[2]);        block[1] ^= F2(block[2], Kr[1], Km[1]);        block[2] ^= F1(block[3], Kr[0], Km[0]);}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:8,


示例7: TEST

TEST(RecorderTest, ArgRecorderTest) {	TRACER_TRACE(&F2) f2;	auto f2a = tracer::RecordArgs(f2);	int a = 5;	F2(a);	for (int i = a; i >= 0; i--) 		EXPECT_EQ(5 - i, f2a.Arg<0>(i));}
开发者ID:QingYun,项目名称:tracer,代码行数:8,


示例8: cast5_decrypt

static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf){	struct cast5_ctx *c = (struct cast5_ctx *) ctx;	const __be32 *src = (const __be32 *)inbuf;	__be32 *dst = (__be32 *)outbuf;	u32 l, r, t;	u32 I;	u32 *Km;	u8 *Kr;	Km = c->Km;	Kr = c->Kr;	l = be32_to_cpu(src[0]);	r = be32_to_cpu(src[1]);	if (!(c->rr)) {		t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);		t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);		t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);		t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);		t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);		t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);		t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]);		t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]);		t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]);		t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]);		t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]);		t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]);		t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]);		t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]);		t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]);		t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]);	} else {		t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);		t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);		t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]);		t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]);		t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]);		t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]);		t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]);		t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]);		t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]);		t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]);		t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]);		t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]);	}	dst[0] = cpu_to_be32(r);	dst[1] = cpu_to_be32(l);}
开发者ID:devicenull,项目名称:supermicro_ipmi_firmware,代码行数:51,


示例9: return

const char* ChannelSelector::getChannelName(){  if (current_channel>CHANNEL_NONE && current_channel<CHANNEL_LAST) {    return (const char*)channel_names[(int)current_channel];  }  else {    return (const char*)F2("N/A");  }}
开发者ID:yodor,项目名称:arduino,代码行数:9,


示例10: main

int main(){	auto a1 = F1();	auto a2 = F2();	auto a3 = F3();	auto a4 = F4();	auto a5 = F5();    return 0;}
开发者ID:potimarimo,项目名称:material-of-a-study-meeting,代码行数:10,


示例11: cast_decrypt

voidcast_decrypt(cast_key* key, u_int8_t* inblock, u_int8_t* outblock){	u_int32_t t, l, r;	/* Get inblock into l,r */	r = ((u_int32_t)inblock[0] << 24) | ((u_int32_t)inblock[1] << 16) |	    ((u_int32_t)inblock[2] << 8) | (u_int32_t)inblock[3];	l = ((u_int32_t)inblock[4] << 24) | ((u_int32_t)inblock[5] << 16) |	    ((u_int32_t)inblock[6] << 8) | (u_int32_t)inblock[7];	/* Do the work */	/* Only do full 16 rounds if key length > 80 bits */	if (key->rounds > 12) {		F1(r, l, 15);		F3(l, r, 14);		F2(r, l, 13);		F1(l, r, 12);	}	F3(r, l, 11);	F2(l, r, 10);	F1(r, l,  9);	F3(l, r,  8);	F2(r, l,  7);	F1(l, r,  6);	F3(r, l,  5);	F2(l, r,  4);	F1(r, l,  3);	F3(l, r,  2);	F2(r, l,  1);	F1(l, r,  0);	/* Put l,r into outblock */	outblock[0] = U8a(l);	outblock[1] = U8b(l);	outblock[2] = U8c(l);	outblock[3] = U8d(l);	outblock[4] = U8a(r);	outblock[5] = U8b(r);	outblock[6] = U8c(r);	outblock[7] = U8d(r);	/* Wipe clean */	t = l = r = 0;}
开发者ID:mikekmv,项目名称:aeriebsd-src,代码行数:42,


示例12: q_deNot

static q_exprq_deNot(    q_expr e){    q_expr r;    if (e == NULL) {        return NULL;    }    if (e->kind == T_FNC) {        switch (e->info.function->tag) {        case Q_EXPR_LIKE:                                    r = e; break;        case Q_EXPR_EQ:   e->info.function->tag = Q_EXPR_NE; r = e; break;        case Q_EXPR_NE:   e->info.function->tag = Q_EXPR_EQ; r = e; break;        case Q_EXPR_LT:   e->info.function->tag = Q_EXPR_GE; r = e; break;        case Q_EXPR_LE:   e->info.function->tag = Q_EXPR_GT; r = e; break;        case Q_EXPR_GT:   e->info.function->tag = Q_EXPR_LE; r = e; break;        case Q_EXPR_GE:   e->info.function->tag = Q_EXPR_LT; r = e; break;        case Q_EXPR_NOT:            r = q_takePar(e,0);            q_dispose(e);        break;        case Q_EXPR_AND:            r = F2(Q_EXPR_OR,q_removeNots(q_takePar(e,0)),q_removeNots(q_takePar(e,1)));            q_dispose(e);        break;        case Q_EXPR_OR:            r = F2(Q_EXPR_AND,q_removeNots(q_takePar(e,0)),q_removeNots(q_takePar(e,1)));            q_dispose(e);        break;        default:            assert(FALSE);            r = e;        break;        }    } else {        r = e;    }    return r;}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:40,


示例13: CAST5decrypt

void CAST5decrypt(const PGPUInt8 *in, PGPUInt8 *out, const PGPUInt32 *xkey){	PGPUInt32 l, r, t;	r = (PGPUInt32) in[0]<<24 | (PGPUInt32) in[1]<<16 | 		(PGPUInt32) in[2]<<8 | in[3];	l = (PGPUInt32) in[4]<<24 | (PGPUInt32) in[5]<<16 | 		(PGPUInt32) in[6]<<8 | in[7];	t = F1(l, xkey, 15); r ^= G1(t);	t = F3(r, xkey, 14); l ^= G3(t);	t = F2(l, xkey, 13); r ^= G2(t);	t = F1(r, xkey, 12); l ^= G1(t);	// Start here if only doing 12 rounds	t = F3(l, xkey, 11); r ^= G3(t);	t = F2(r, xkey, 10); l ^= G2(t);	t = F1(l, xkey,  9); r ^= G1(t);	t = F3(r, xkey,  8); l ^= G3(t);	t = F2(l, xkey,  7); r ^= G2(t);	t = F1(r, xkey,  6); l ^= G1(t);	t = F3(l, xkey,  5); r ^= G3(t);	t = F2(r, xkey,  4); l ^= G2(t);	t = F1(l, xkey,  3); r ^= G1(t);	t = F3(r, xkey,  2); l ^= G3(t);	t = F2(l, xkey,  1); r ^= G2(t);	t = F1(r, xkey,  0); l ^= G1(t);	out[0]	= (PGPUInt8) B0(l);	out[1]	= (PGPUInt8) B1(l);	out[2]	= (PGPUInt8) B2(l);	out[3]	= (PGPUInt8) B3(l);	out[4]	= (PGPUInt8) B0(r);	out[5]	= (PGPUInt8) B1(r);	out[6]	= (PGPUInt8) B2(r);	out[7]	= (PGPUInt8) B3(r);}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:38,


示例14: bf_e_block

static void bf_e_block(uint32_t *p_xl, uint32_t *p_xr){  uint32_t temp;  uint32_t xl = *p_xl;  uint32_t xr = *p_xr;  F1(0) F2(1) F1(2) F2(3) F1(4) F2(5) F1(6) F2(7)  F1(8) F2(9) F1(10) F2(11) F1(12) F2(13) F1(14) F2(15)  xl ^= pax[16];  xr ^= pax[17];  temp = xl;  xl = xr;  xr = temp;  *p_xl = xl;  *p_xr = xr;}
开发者ID:MarcWeber,项目名称:neovim,代码行数:16,


示例15: Vector_Drive

voidVector_Drive(vector V, double omega){	vector F1(-1.000,0.000), F2(0.500,-0.866), F3(0.866,0.500);	double omega1, omega2, omega3, b=0.090, r=0.020, h=0;	omega1 = ( F1*V + b*omega ) / r;	// F1*V is overloaded dot product	omega2 = ( F2*V + b*omega ) / r;	omega3 = ( F3*V + b*omega ) / r;	// makes sure that given path is physically possible	if ( (omega1>6) || (omega2>6) || (omega3>6) || (omega1<-6) || (omega2<-6) || (omega3<-6) )		DisplayTxt("Vectors: ERROR!");	else 		Drive(Vel_To_Value(omega1),Vel_To_Value(omega2),Vel_To_Value(omega3));}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:14,


示例16: CAST5encrypt

/* * Encrypt the 8 bytes at *in into the 8 bytes at *out using the expanded * key schedule from *xkey. */static voidCAST5encrypt(PGPByte const *in, PGPByte *out, PGPUInt32 const *xkey){	PGPUInt32 l, r, t;	l = (PGPUInt32)		in[0]<<24 | (PGPUInt32)in[1]<<16 | (PGPUInt32)in[2]<<8 | in[3];	r = (PGPUInt32)		in[4]<<24 | (PGPUInt32)in[5]<<16 | (PGPUInt32)in[6]<<8 | in[7];	t = F1(r, xkey,  0); l ^= G1(t);	t = F2(l, xkey,  1); r ^= G2(t);	t = F3(r, xkey,  2); l ^= G3(t);	t = F1(l, xkey,  3); r ^= G1(t);	t = F2(r, xkey,  4); l ^= G2(t);	t = F3(l, xkey,  5); r ^= G3(t);	t = F1(r, xkey,  6); l ^= G1(t);	t = F2(l, xkey,  7); r ^= G2(t);	t = F3(r, xkey,  8); l ^= G3(t);	t = F1(l, xkey,  9); r ^= G1(t);	t = F2(r, xkey, 10); l ^= G2(t);	t = F3(l, xkey, 11); r ^= G3(t);	/* Stop here if only doing 12 rounds */	t = F1(r, xkey, 12); l ^= G1(t);	t = F2(l, xkey, 13); r ^= G2(t);	t = F3(r, xkey, 14); l ^= G3(t);	t = F1(l, xkey, 15); r ^= G1(t);	out[0] = B0(r);	out[1] = B1(r);	out[2] = B2(r);	out[3] = B3(r);	out[4] = B0(l);	out[5] = B1(l);	out[6] = B2(l);	out[7] = B3(l);}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:41,


示例17: QWidget

seconlevel_f4::seconlevel_f4(QWidget *parent) :    QWidget(parent),    ui(new Ui::seconlevel_f4){    ui->setupUi(this);    group = new GroupDialog(parent);    group->hide();    connect(group ,SIGNAL(finished(int)) ,this ,SLOT(f1_Done(int)));    autotab = new AutoDialog(parent);    autotab->hide();    connect(autotab ,SIGNAL(finished(int)) ,this ,SLOT(f2_Done(int)));    jump = new JumpDialog(parent);    jump->hide();    connect(jump ,SIGNAL(finished(int)) ,this ,SLOT(f6_Done(int)));    connect(ui->pushButton_F1,SIGNAL(clicked()),this ,SLOT(F1()));    ui->pushButton_F1->setCheckable(true);    connect(ui->pushButton_F2,SIGNAL(clicked()),this ,SLOT(F2()));    ui->pushButton_F2->setCheckable(true);    connect(ui->pushButton_F3,SIGNAL(clicked()),this ,SLOT(F3()));    ui->pushButton_F3->setCheckable(true);    connect(ui->pushButton_F4,SIGNAL(clicked()),this ,SLOT(F4()));    ui->pushButton_F4->setCheckable(true);    connect(ui->pushButton_F5,SIGNAL(clicked()),this ,SLOT(F5()));    ui->pushButton_F5->setCheckable(true);    connect(ui->pushButton_F6,SIGNAL(clicked()),this ,SLOT(F6()));    ui->pushButton_F6->setCheckable(true);    connect(ui->pushButton_F7,SIGNAL(clicked()),this ,SLOT(F7()));    ui->pushButton_F7->setCheckable(true);    connect(this ,SIGNAL(enter(int)),parent ,SLOT(funcbarUpdate(int)));    connect(ui->pushButton_F8,SIGNAL(clicked()),this ,SLOT(F8()));    /*数据表模式改变信号*/    connect(this ,SIGNAL(stateChange(char)) ,parent ,SLOT(tableStateUpdate(char)));    /*段选信号*/    connect(this ,SIGNAL(selectRows(bool)) ,parent ,SLOT(tableSelect(bool)));    setFocusPolicy(Qt::NoFocus);}
开发者ID:taiyuankejizhu,项目名称:SparkZNC,代码行数:49,


示例18: main

int main() {  typedef OKlib::Literals::Literals_int literal_type;  typedef std::vector<literal_type> clause_type;  typedef std::vector<clause_type> clause_set1_type;  typedef OKlib::InputOutput::RawDimacsCLSAdaptor<literal_type, clause_set1_type> InputClsadaptor;  InputClsadaptor F1;  OKlib::InputOutput::StandardDIMACSInput<InputClsadaptor>(std::cin, F1);  const InputClsadaptor::int_type n = F1.stat.parameter_n;  typedef std::list<clause_type> clause_set2_type;  clause_set2_type F2(F1.clause_set.begin(), F1.clause_set.end());  F1.clause_set.clear();  if (F2.size() >= 2) {    clause_set2_type F_removed;    typedef clause_set2_type::iterator clause_iterator;    const clause_iterator F2end = F2.end();    for (struct {clause_iterator Ci, next;} l = {F2.begin(), boost::next(F2.begin())}; l.Ci != F2end; l.Ci = l.next) {      l.next = boost::next(l.Ci);      F_removed.splice(F_removed.begin(), F2, l.Ci);      typedef OKlib::Satisfiability::Reductions::UnitClausePropagation::CLSAdaptorUcpW<          OKlib::Satisfiability::ProblemInstances::Clauses::WatchedLiterals_mono<literal_type>,          OKlib::Satisfiability::Assignments::TotalAssignments::BAssignmentWithQueue<literal_type> >        Ucp;      Ucp U;      OKlib::InputOutput::ListTransfer<Ucp>(F2, U, n);      const Ucp::assignment_type f(U.assignment());      if (U.contradicting_uclause()) continue;      bool removable = true;      const clause_iterator Frend = F_removed.end();      for (clause_iterator Di = F_removed.begin(); Di != Frend; ++Di, U.contradicting_uclause() = false) {        U.set_assignments(f);        const clause_type& D = *Di;        typedef clause_type::const_iterator literal_iterator;        for (literal_iterator xi = D.begin(); xi != D.end(); ++xi)          U.push_unit_clause(-*xi);        if (not U.perform_ucp()) { removable = false; break; }      }      if (not removable) F2.splice(l.next, F_removed, F_removed.begin());    }  }  {   typedef OKlib::InputOutput::CLSAdaptorDIMACSOutput<literal_type> OutputClsadaptor;   OutputClsadaptor out(std::cout);   OKlib::InputOutput::ListTransfer<OutputClsadaptor>(F2, out, "");  }}
开发者ID:exp04shy,项目名称:oklibrary,代码行数:49,


示例19: g

int g(unsigned char *in,int i,dword *h){	dword h0,h1,h2,h3,h4,a,b,c,d,e,temp;	unsigned char *kp;	dword w[80];	kp = in;	h0 = WORD(kp); kp += 4;	h1 = WORD(kp); kp += 4;	h2 = WORD(kp); kp += 4;	h3 = WORD(kp); kp += 4;	h4 = WORD(kp); kp += 4;	w[0] = i;	for (i=1;i<16;i++) w[i] = 0;	for (i=16;i<80;i++) w[i] = w[i-3]^w[i-8]^w[i-14]^w[i-16];	a = h0; b = h1; c = h2; d = h3; e = h4;	for(i=0;i<20;i++)	{		temp = ROT27(a) + F1(b, c, d) + e + w[i] + 0x5a827998;		e = d; d = c; c = ROT2(b); b = a; a = temp;	}	for (i=20;i<40;i++)	{		temp = ROT27(a) + F2(b, c, d) + e + w[i] + 0x6ef9eba1;		e = d; d = c; c = ROT2(b); b = a; a = temp;	}	for (i=40;i<60;i++)	{		temp = ROT27(a) + F3(b, c, d) + e + w[i] + 0x7f1cbcdc;		e = d; d = c; c = ROT2(b); b = a; a = temp;	}	for (i=60;i<80;i++)	{		temp = ROT27(a) + F4(b, c, d) + e + w[i] + 0xaa62d1d6;		e = d; d = c; c = ROT2(b); b = a; a = temp;	}	h[0] = h0+a; h[1] = h1+b; h[2] = h2+c; h[3] = h3+d; h[4] = h4+e;	return (ALG_OK);}
开发者ID:Beanux,项目名称:openkore_fork,代码行数:46,


示例20: sha256_transform

void sha256_transform (uint32 *buf, uint32 const *in){  uint32 w[64] ;  unsigned int i = 0 ;  register uint32 a = buf[0], b = buf[1], c = buf[2], d = buf[3], e = buf[4], f = buf[5], g = buf[6], h = buf[7] ;  for (; i < 16 ; i++) w[i] = in[i] ;  for (; i < 64 ; i++)    w[i] = SMALLSIGMA1(w[i-2]) + w[i-7] + SMALLSIGMA0(w[i-15]) + w[i-16] ;  for (i = 0 ; i < 64 ; i++)  {    uint32 temp1 = h + CAPITALSIGMA1(e) + F1(e, f, g) + sha256_constants[i] + w[i] ;    uint32 temp2 = CAPITALSIGMA0(a) + F2(a, b, c) ;    h = g ; g = f ; f = e ; e = d + temp1 ;    d = c ; c = b ; b = a ; a = temp1 + temp2 ;  }  buf[0] += a ; buf[1] += b ; buf[2] += c ; buf[3] += d ;  buf[4] += e ; buf[5] += f ; buf[6] += g ; buf[7] += h ;}
开发者ID:Jubei-Mitsuyoshi,项目名称:aaa-skalibs,代码行数:19,


示例21: setAmpPower

void ChannelSelector::setAmpPower(bool mode){  MDISPLAY.showMessage(F2("Processing ..."));  uint8_t cmd = 0;  if (mode) {    // power on amp      cmd = (uint8_t)(CMD_PWR_AMP_ON);    Wire.beginTransmission(ADDR_PWR);    Wire.write(cmd);    Wire.endTransmission(true);      delay(2000);    // set mute off    cmd = (uint8_t)(CMD_VOL_MUTE_OFF);    Wire.beginTransmission(ADDR_VOLUME);    Wire.write(cmd);    Wire.endTransmission(true);      delay(1000);  }  else {    // set mute on    cmd = (uint8_t)(CMD_VOL_MUTE_ON);    Wire.beginTransmission(ADDR_VOLUME);    Wire.write(cmd);    Wire.endTransmission(true);      delay(1000);    // power off amp    cmd = (uint8_t)(CMD_PWR_AMP_OFF);    Wire.beginTransmission(ADDR_PWR);    Wire.write(cmd);    Wire.endTransmission(true);      delay(2000);      }    GLOBALS.amp_power_enabled = mode;  }
开发者ID:yodor,项目名称:arduino,代码行数:39,


示例22: main

int main(){    std_setup();        ml_random rng;                {		// output analytic solution		        grid2D<double, double > F1( 500, -10.0, 10.0, 500, -10.0, 10.0 );        grid2D<double, double > F2( F1 );        grid2D<double, double > G1( F1 );        grid2D<double, double > G2( F1 );                F1 = V_1;        F2 = V_2;                laplacian_2d_hdaf Del2;        Del2.init( F1.n1, F1.n2, F1.b1-F1.a1, F1.b2-F1.a2, 24, 24, .5, .5 );                Del2.execute( F1.array, G1.array );        Del2.execute( F2.array, G2.array );                        plotGrid2D_1( F1,  "/workspace/output/scratch/F1.png", color_map_green );        plotGrid2D_1( F2,  "/workspace/output/scratch/F2.png", color_map_green );        plotGrid2D_1( G1,  "/workspace/output/scratch/G1.png", color_map_error );        plotGrid2D_1( G2,  "/workspace/output/scratch/G2.png", color_map_error );	}                            std_exit();}
开发者ID:nmaxwell,项目名称:PythonWorkshop,代码行数:39,


示例23: main

int main() {    int t,i,j,k;    int x[M][M], y[M][M];    int x3[M][M][M];    for (i = 1 ; i<=M; i++) {        for (j = 1; j<=M; j++) {            for (k = 1; k<=3; k++) {                src(&(x3[i][j][k]));            }        }    }    for (i = 1 ; i<=M; i++) {        for (j = 1; j<=M; j++) {            for (k = 1; k<=3; k++) {                if (k <= 2) {                    F1(&(x3[i][j][k]), &(x3[i][j][k]));                } else {                    F2(&(x3[i][j][k]), &(x3[i][j][k]));                }            }        }    }    for (i = 1 ; i<=M; i++) {        for (j = 1; j<=M; j++) {            for (k = 1; k<=3; k++) {                sink(&(x3[i][j][k]));            }        }    }    return 0;}
开发者ID:svenvh,项目名称:pntools,代码行数:37,


示例24: F

Eigen::MatrixXd TimeIntegrator::GeneralisedAlpha(Eigen::MatrixXd &K, Eigen::MatrixXd &M, double &del, double &gam, double &alphaf, double &alpham){    Eigen::MatrixXd U,V,A;    U.setZero(K.rows(),_nstep+1);    V.setZero(K.rows(),_nstep+1); A.setZero(K.rows(),_nstep+1);    Eigen::VectorXd F = Eigen::VectorXd::Zero(K.rows());    Eigen::VectorXd F2 = Eigen::VectorXd::Zero(K.rows());    // Loop over time steps    for (int istep=0; istep<_nstep; ++istep)    {        if (istep==_nstep-1)            break;        for (int i=0; i<_napp.rows(); ++i)        {            F(_napp(i)) = F1(istep);            F2(_napp(i)) = F1(istep+1);        }        U.col(istep+1) = ((1-alpham)/_dt/_dt/gam*M+(1-alphaf)*K).llt().solve((1-alphaf)*F2+alphaf*F+((1-alpham)/_dt/_dt/gam*M-alphaf*K)*U.col(istep)+(1-alpham)/_dt/gam*M*V.col(istep)+((1-alpham)*(1.0/2.0/gam-1)-alpham)*M*A.col(istep));        A.col(istep+1) = 1.0/(_dt*_dt*gam)*(U.col(istep+1)-U.col(istep))-1.0/(_dt*gam)*V.col(istep)+(1-1.0/(2.0*gam))*A.col(istep);        V.col(istep+1) = V.col(istep)+_dt*(del*A.col(istep+1)+(1-del)*A.col(istep));    }    return U;}
开发者ID:koecher,项目名称:FEAPB,代码行数:24,


示例25: sha1_step

static voidsha1_step(struct sha1_ctxt *ctxt){	uint32_t	a, b, c, d, e;	size_t t, s;	uint32_t	tmp;#if !WORDS_BIGENDIAN	struct sha1_ctxt tctxt;	memmove(&tctxt.m.b8[0], &ctxt->m.b8[0], 64);	ctxt->m.b8[0] = tctxt.m.b8[3]; ctxt->m.b8[1] = tctxt.m.b8[2];	ctxt->m.b8[2] = tctxt.m.b8[1]; ctxt->m.b8[3] = tctxt.m.b8[0];	ctxt->m.b8[4] = tctxt.m.b8[7]; ctxt->m.b8[5] = tctxt.m.b8[6];	ctxt->m.b8[6] = tctxt.m.b8[5]; ctxt->m.b8[7] = tctxt.m.b8[4];	ctxt->m.b8[8] = tctxt.m.b8[11]; ctxt->m.b8[9] = tctxt.m.b8[10];	ctxt->m.b8[10] = tctxt.m.b8[9]; ctxt->m.b8[11] = tctxt.m.b8[8];	ctxt->m.b8[12] = tctxt.m.b8[15]; ctxt->m.b8[13] = tctxt.m.b8[14];	ctxt->m.b8[14] = tctxt.m.b8[13]; ctxt->m.b8[15] = tctxt.m.b8[12];	ctxt->m.b8[16] = tctxt.m.b8[19]; ctxt->m.b8[17] = tctxt.m.b8[18];	ctxt->m.b8[18] = tctxt.m.b8[17]; ctxt->m.b8[19] = tctxt.m.b8[16];	ctxt->m.b8[20] = tctxt.m.b8[23]; ctxt->m.b8[21] = tctxt.m.b8[22];	ctxt->m.b8[22] = tctxt.m.b8[21]; ctxt->m.b8[23] = tctxt.m.b8[20];	ctxt->m.b8[24] = tctxt.m.b8[27]; ctxt->m.b8[25] = tctxt.m.b8[26];	ctxt->m.b8[26] = tctxt.m.b8[25]; ctxt->m.b8[27] = tctxt.m.b8[24];	ctxt->m.b8[28] = tctxt.m.b8[31]; ctxt->m.b8[29] = tctxt.m.b8[30];	ctxt->m.b8[30] = tctxt.m.b8[29]; ctxt->m.b8[31] = tctxt.m.b8[28];	ctxt->m.b8[32] = tctxt.m.b8[35]; ctxt->m.b8[33] = tctxt.m.b8[34];	ctxt->m.b8[34] = tctxt.m.b8[33]; ctxt->m.b8[35] = tctxt.m.b8[32];	ctxt->m.b8[36] = tctxt.m.b8[39]; ctxt->m.b8[37] = tctxt.m.b8[38];	ctxt->m.b8[38] = tctxt.m.b8[37]; ctxt->m.b8[39] = tctxt.m.b8[36];	ctxt->m.b8[40] = tctxt.m.b8[43]; ctxt->m.b8[41] = tctxt.m.b8[42];	ctxt->m.b8[42] = tctxt.m.b8[41]; ctxt->m.b8[43] = tctxt.m.b8[40];	ctxt->m.b8[44] = tctxt.m.b8[47]; ctxt->m.b8[45] = tctxt.m.b8[46];	ctxt->m.b8[46] = tctxt.m.b8[45]; ctxt->m.b8[47] = tctxt.m.b8[44];	ctxt->m.b8[48] = tctxt.m.b8[51]; ctxt->m.b8[49] = tctxt.m.b8[50];	ctxt->m.b8[50] = tctxt.m.b8[49]; ctxt->m.b8[51] = tctxt.m.b8[48];	ctxt->m.b8[52] = tctxt.m.b8[55]; ctxt->m.b8[53] = tctxt.m.b8[54];	ctxt->m.b8[54] = tctxt.m.b8[53]; ctxt->m.b8[55] = tctxt.m.b8[52];	ctxt->m.b8[56] = tctxt.m.b8[59]; ctxt->m.b8[57] = tctxt.m.b8[58];	ctxt->m.b8[58] = tctxt.m.b8[57]; ctxt->m.b8[59] = tctxt.m.b8[56];	ctxt->m.b8[60] = tctxt.m.b8[63]; ctxt->m.b8[61] = tctxt.m.b8[62];	ctxt->m.b8[62] = tctxt.m.b8[61]; ctxt->m.b8[63] = tctxt.m.b8[60];#endif	a = H(0); b = H(1); c = H(2); d = H(3); e = H(4);	for (t = 0; t < 20; t++) {		s = t & 0x0f;		if (t >= 16) {			W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^ W((s+2) & 0x0f) ^ W(s));		}		tmp = S(5, a) + F0(b, c, d) + e + W(s) + K(t);		e = d; d = c; c = S(30, b); b = a; a = tmp;	}	for (t = 20; t < 40; t++) {		s = t & 0x0f;		W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^ W((s+2) & 0x0f) ^ W(s));		tmp = S(5, a) + F1(b, c, d) + e + W(s) + K(t);		e = d; d = c; c = S(30, b); b = a; a = tmp;	}	for (t = 40; t < 60; t++) {		s = t & 0x0f;		W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^ W((s+2) & 0x0f) ^ W(s));		tmp = S(5, a) + F2(b, c, d) + e + W(s) + K(t);		e = d; d = c; c = S(30, b); b = a; a = tmp;	}	for (t = 60; t < 80; t++) {		s = t & 0x0f;		W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^ W((s+2) & 0x0f) ^ W(s));		tmp = S(5, a) + F3(b, c, d) + e + W(s) + K(t);		e = d; d = c; c = S(30, b); b = a; a = tmp;	}	H(0) = H(0) + a;	H(1) = H(1) + b;	H(2) = H(2) + c;	H(3) = H(3) + d;	H(4) = H(4) + e;	memset(&ctxt->m.b8[0], 0, 64);}
开发者ID:bechtoldt,项目名称:dovecot-core,代码行数:81,


示例26: reconstruct

static void reconstruct(double *x, double *y, int len){  double *temp_1, *temp_2;  double *even, *odd;  int i, n_half, n_unrol;  n_half = len >> 1;  even = x;  odd = x + n_half;  temp_1 = y;  temp_2 = y + n_half;  n_unrol = n_half & 0xfffffff8;  for (i = 0; i < n_unrol; i += 8) {    even[i + 0] /= NORM_FACTOR;    even[i + 1] /= NORM_FACTOR;    even[i + 2] /= NORM_FACTOR;    even[i + 3] /= NORM_FACTOR;    even[i + 4] /= NORM_FACTOR;    even[i + 5] /= NORM_FACTOR;    even[i + 6] /= NORM_FACTOR;    even[i + 7] /= NORM_FACTOR;    odd[i + 0] *= NORM_FACTOR;    odd[i + 1] *= NORM_FACTOR;    odd[i + 2] *= NORM_FACTOR;    odd[i + 3] *= NORM_FACTOR;    odd[i + 4] *= NORM_FACTOR;    odd[i + 5] *= NORM_FACTOR;    odd[i + 6] *= NORM_FACTOR;    odd[i + 7] *= NORM_FACTOR;  }  for (; i < n_half; i++) {    even[i] /= NORM_FACTOR;    odd[i] *= NORM_FACTOR;  }  PHI3(odd, temp_1, temp_2, n_half);  for (i = 0; i < n_unrol; i += 8) {    even[i + 0] -= temp_1[i + 0];    even[i + 1] -= temp_1[i + 1];    even[i + 2] -= temp_1[i + 2];    even[i + 3] -= temp_1[i + 3];    even[i + 4] -= temp_1[i + 4];    even[i + 5] -= temp_1[i + 5];    even[i + 6] -= temp_1[i + 6];    even[i + 7] -= temp_1[i + 7];  }  for (; i < n_half; i++) even[i] -= temp_1[i];  F2(even, temp_1, temp_2, n_half);  for (i = 0; i < n_unrol; i += 8) {    odd[i + 0] += temp_1[i + 0];    odd[i + 1] += temp_1[i + 1];    odd[i + 2] += temp_1[i + 2];    odd[i + 3] += temp_1[i + 3];    odd[i + 4] += temp_1[i + 4];    odd[i + 5] += temp_1[i + 5];    odd[i + 6] += temp_1[i + 6];    odd[i + 7] += temp_1[i + 7];  }  for (; i < n_half; i++) odd[i] += temp_1[i];  for (i = 0; i < n_unrol; i += 8) {    y[((i + 0) << 1)] = even[i + 0];    y[((i + 1) << 1)] = even[i + 1];    y[((i + 2) << 1)] = even[i + 2];    y[((i + 3) << 1)] = even[i + 3];    y[((i + 4) << 1)] = even[i + 4];    y[((i + 5) << 1)] = even[i + 5];    y[((i + 6) << 1)] = even[i + 6];    y[((i + 7) << 1)] = even[i + 7];    y[((i + 0) << 1) + 1] = odd[i + 0];    y[((i + 1) << 1) + 1] = odd[i + 1];    y[((i + 2) << 1) + 1] = odd[i + 2];    y[((i + 3) << 1) + 1] = odd[i + 3];    y[((i + 4) << 1) + 1] = odd[i + 4];    y[((i + 5) << 1) + 1] = odd[i + 5];    y[((i + 6) << 1) + 1] = odd[i + 6];    y[((i + 7) << 1) + 1] = odd[i + 7];  }  for (; i < n_half; i++) {    y[(i << 1)] = even[i];    y[(i << 1) + 1] = odd[i];  }}
开发者ID:Upliner,项目名称:tilib,代码行数:100,


示例27: compareDataCard

void compareDataCard(		     TString channel="muTau",		     TString year="2011",		     TString Group1="CERN",		     TString Path1="/afs/cern.ch/user/b/benitezj/public/datacards/2011/Aug4",		     TString File1="muTauSM_svfitmass",		     TString Group2="Saclay",		     TString Path2="/afs/cern.ch/user/b/bianchi/public/Roger/datacards2011v3",		     TString File2="muTauSM"		     ){  TFile F1(Path1+"/"+File1+".root","read");  TFile F2(Path2+"/"+File2+".root","read");    F1.ls();  F2.ls();  TString fname="Diff_"+channel+"_"+year+"_"+Group1+"_"+Group2;  TCanvas C(fname);    C.Print(TString(C.GetName())+".pdf[");    //cout<<" | 0jet_low Data | 0jet_low ZTT | 0jet_low W | 0jet_low QCD | 0jet_low TT | 0jet_low  ggH | 0jet_low  qqH | Boosted_high Data | Boosted_high ZTT | Boosted_high W | Boosted_high QCD | Boosted_high TT | Boosted_high ggH | Boosted_high qqH | VBF Data| VBF ZTT | VBF W | VBF QCD | VBF TT | VBF qqH | VBF ggH |"<<endl;//   drawCategory(&C,Group1,&F1,Group2,&F2,channel,"0jet_low",1);//   drawCategory(&C,Group1,&F1,Group2,&F2,channel,"0jet_high",0);//   drawCategory(&C,Group1,&F1,Group2,&F2,channel,"boost_low",0);//   drawCategory(&C,Group1,&F1,Group2,&F2,channel,"boost_high",1);//   drawCategory(&C,Group1,&F1,Group2,&F2,channel,"vbf",1);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"data_obs",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZTT",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"W",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"QCD",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"TT",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZL",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZJ",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZLL",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"VV",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"ggH125",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"qqH125",0);  drawSample(&C,Group1,&F1,Group2,&F2,channel,"VH125",0);//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"boost_high","ggH");//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"boost_high","qqH");//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"boost_high","VH");//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"vbf","ggH");//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"vbf","qqH");//   drawSignalDiff(&C,Group1,&F1,Group2,&F2,channel,"vbf","VH");  //drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZTT_CMS_scale_t_mutau_8TeVUp",0);  //drawSample(&C,Group1,&F1,Group2,&F2,channel,"ZTT_CMS_scale_t_mutau_8TeVDown",0);  C.Print(TString(C.GetName())+".pdf]");    //cout<<"|"<<endl;//   gROOT->ProcessLine(".q");}
开发者ID:inaranjo,项目名称:ElectronsStudies,代码行数:65,


示例28: rmd160_compress

/* The RIPEMD160 compression function. */static inline void rmd160_compress(struct rmd160_ctx *ctx, uint32_t *buf){    uint8_t w, round;    uint32_t T;    uint32_t AL, BL, CL, DL, EL;    /* left line */    uint32_t AR, BR, CR, DR, ER;    /* right line */    uint32_t X[16];    /* Byte-swap the buffer if we're on a big-endian machine */    cpu_to_le32_array(X, buf, 16);    /* Load the left and right lines with the initial state */    AL = AR = ctx->h[0];    BL = BR = ctx->h[1];    CL = CR = ctx->h[2];    DL = DR = ctx->h[3];    EL = ER = ctx->h[4];    /* Round 1 */    round = 0;    for (w = 0; w < 16; w++) { /* left line */        T = rol32(AL + F1(BL, CL, DL) + X[RL[round][w]] + KL[round], SL[round][w]) + EL;        AL = EL; EL = DL; DL = rol32(CL, 10); CL = BL; BL = T;    }    for (w = 0; w < 16; w++) { /* right line */        T = rol32(AR + F5(BR, CR, DR) + X[RR[round][w]] + KR[round], SR[round][w]) + ER;        AR = ER; ER = DR; DR = rol32(CR, 10); CR = BR; BR = T;    }    /* Round 2 */    round++;    for (w = 0; w < 16; w++) { /* left line */        T = rol32(AL + F2(BL, CL, DL) + X[RL[round][w]] + KL[round], SL[round][w]) + EL;        AL = EL; EL = DL; DL = rol32(CL, 10); CL = BL; BL = T;    }    for (w = 0; w < 16; w++) { /* right line */        T = rol32(AR + F4(BR, CR, DR) + X[RR[round][w]] + KR[round], SR[round][w]) + ER;        AR = ER; ER = DR; DR = rol32(CR, 10); CR = BR; BR = T;    }    /* Round 3 */    round++;    for (w = 0; w < 16; w++) { /* left line */        T = rol32(AL + F3(BL, CL, DL) + X[RL[round][w]] + KL[round], SL[round][w]) + EL;        AL = EL; EL = DL; DL = rol32(CL, 10); CL = BL; BL = T;    }    for (w = 0; w < 16; w++) { /* right line */        T = rol32(AR + F3(BR, CR, DR) + X[RR[round][w]] + KR[round], SR[round][w]) + ER;        AR = ER; ER = DR; DR = rol32(CR, 10); CR = BR; BR = T;    }    /* Round 4 */    round++;    for (w = 0; w < 16; w++) { /* left line */        T = rol32(AL + F4(BL, CL, DL) + X[RL[round][w]] + KL[round], SL[round][w]) + EL;        AL = EL; EL = DL; DL = rol32(CL, 10); CL = BL; BL = T;    }    for (w = 0; w < 16; w++) { /* right line */        T = rol32(AR + F2(BR, CR, DR) + X[RR[round][w]] + KR[round], SR[round][w]) + ER;        AR = ER; ER = DR; DR = rol32(CR, 10); CR = BR; BR = T;    }    /* Round 5 */    round++;    for (w = 0; w < 16; w++) { /* left line */        T = rol32(AL + F5(BL, CL, DL) + X[RL[round][w]] + KL[round], SL[round][w]) + EL;        AL = EL; EL = DL; DL = rol32(CL, 10); CL = BL; BL = T;    }    for (w = 0; w < 16; w++) { /* right line */        T = rol32(AR + F1(BR, CR, DR) + X[RR[round][w]] + KR[round], SR[round][w]) + ER;        AR = ER; ER = DR; DR = rol32(CR, 10); CR = BR; BR = T;    }    /* Final mixing stage */    T = ctx->h[1] + CL + DR;    ctx->h[1] = ctx->h[2] + DL + ER;    ctx->h[2] = ctx->h[3] + EL + AR;    ctx->h[3] = ctx->h[4] + AL + BR;    ctx->h[4] = ctx->h[0] + BL + CR;    ctx->h[0] = T;}
开发者ID:oklm-wsh,项目名称:Digestif,代码行数:82,



注:本文中的F2函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ F2FS_I函数代码示例
C++ F函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。