class gentry // TAGE global table entry { public: int8_t ctr; uint16_t tag; int8_t u; gentry () { ctr = 0; tag = 0; u = 0; } }; gentry *gtable[NHIST + 1]; gtable[1] = new gentry[NBANKLOW * (1 << LOGG)]; gtable[BORN] = new gentry[NBANKHIGH * (1 << LOGG)]; for (int i = BORN + 1; i <= NHIST; i++) gtable[i] = gtable[BORN]; for (int i = 2; i <= BORN - 1; i++) gtable[i] = gtable[1]; gtable[i][GI[i]].tag == GTAG[i]
时间: 2023-07-14 18:12:46 浏览: 139
HElib-master.zip_HElib_helib怎么用_linux helib_全同态_同态加密
这段代码是一个TAGE(Tagged Geometric History Length Predictor)的实现,用于预测处理器的分支跳转。它定义了一个叫做gentry的类,其中包含三个成员变量:ctr、tag和u。然后创建了一个大小为(NHIST+1)*NBANKLOW*(1<<LOGG)的二维数组gtable,其中gtable[1]和gtable[BORN]分别是低位表和高位表,其余的gtable[i]都指向gtable[BORN]。最后一行代码是访问gtable[i][GI[i]]的tag成员变量,用于获取对应的标签值GTAG[i]。
阅读全文