MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetIndices

Method GetIndices

src/crypto/equihash.cpp:283–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281
282template<size_t WIDTH>
283std::vector<unsigned char> FullStepRow<WIDTH>::GetIndices(size_t len, size_t lenIndices,
284 size_t cBitLen) const
285{
286 assert(((cBitLen+1)+7)/8 <= sizeof(eh_index));
287 size_t minLen { (cBitLen+1)*lenIndices/(8*sizeof(eh_index)) };
288 size_t bytePad { sizeof(eh_index) - ((cBitLen+1)+7)/8 };
289 std::vector<unsigned char> ret(minLen);
290 CompressArray(hash+len, lenIndices, ret.data(), minLen, cBitLen+1, bytePad);
291 return ret;
292}
293
294template<size_t WIDTH>
295bool HasCollision(StepRow<WIDTH>& a, StepRow<WIDTH>& b, size_t l)

Callers 2

BasicSolveMethod · 0.80
OptimisedSolveMethod · 0.80

Calls 2

CompressArrayFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected