Fix last point FFT times2

This commit is contained in:
Jordi Baylina 2020-09-03 11:28:42 +02:00
parent 1fafad70ee
commit 2ddfb6391c
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
6 changed files with 10 additions and 10 deletions

@ -3773,7 +3773,7 @@ async function preparePhase2(oldPtauFilename, newPTauFilename, logger) {
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
@ -3973,7 +3973,7 @@ async function convert(oldPtauFilename, newPTauFilename, logger) {
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );

@ -3571,7 +3571,7 @@ async function preparePhase2(oldPtauFilename, newPTauFilename, logger) {
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );
@ -3771,7 +3771,7 @@ async function convert(oldPtauFilename, newPTauFilename, logger) {
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -73,7 +73,7 @@ export default async function convert(oldPtauFilename, newPTauFilename, logger)
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );

@ -67,7 +67,7 @@ export default async function preparePhase2(oldPtauFilename, newPTauFilename, lo
for (let i=0; i<nChunks; i++) { for (let i=0; i<nChunks; i++) {
let buff; let buff;
if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`); if (logger) logger.debug(`${sectionName} Prepare ${i+1}/${nChunks}`);
if ((oldSectionId == 2)&&(p==power+1)) { if ((i==nChunks-1)&&(oldSectionId == 2)&&(p==power+1)) {
buff = new Uint8Array(pointsPerChunk*sGin); buff = new Uint8Array(pointsPerChunk*sGin);
await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin ); await fdOld.readToBuffer(buff, 0,(pointsPerChunk-1)*sGin );
buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin ); buff.set(curve.G1.zeroAffine, (pointsPerChunk-1)*sGin );