bool cycleHasSIMDReg(const CycleInfo& cycle, MovePlan& moves) { auto& first = cycle.node; auto node = first; do { if (node.isSIMD()) return true; node = moves[node]; } while (node != first); return false; }
LTdecoder* mallocDecoder(void) { LTdecoder *dec = chk_malloc(1, sizeof(LTdecoder)); dec->RXsymbList = NULL; dec->lastRXsymbol = NULL; dec->decoded = NULL; dec->bucketList = NULL; dec->NumRecSymbols = 0; dec->NumDecSymbols = 0; dec->decodingStatus = NULL; // SIMD dec->xorType = isSIMD(); return dec; }
LTdecoderFLY* mallocDecoderFLY(unsigned int decodedSymbolsBufferSize) { LTdecoderFLY *dec = chk_malloc(1, sizeof(LTdecoderFLY)); dec->RXsymbList = NULL; dec->lastRXsymbol = NULL; dec->bucketFLYList = NULL; dec->NumRecSymbols = 0; dec->NumDecSymbols = 0; dec->decoded = NULL; dec->k = decodedSymbolsBufferSize; dec->decodingStatus = NULL; // SIMD dec->xorType = isSIMD(); return dec; }
LTencoderFLY* mallocEncoderFLY(unsigned long seed) { LTencoderFLY *encoder = chk_malloc(1, sizeof(LTencoderFLY)); encoder->refRandomSeed = seed; // set the first randomSeed encoder->xorType = isSIMD(); encoder->totGenSymbols = 0; // Create the LThashTable for the degree distributions encoder->DistributionsTable = create_hashtable(MINHASHTABLESIZE, hashfromkey, equalkeys); if (encoder->DistributionsTable == NULL) exit(-1); /*oom*/ #ifdef DEBUGencoderPrintBucketRandomSeed printf("Encoder[malloc()] - Seed: %lu\n", encoder->refRandomSeed); #endif return encoder; }