As I understand it, something to brag about, or maybe you're waiting for potential investors?
Developing the theme of solving the puzzle, perhaps this will provide an incentive for independent code writing for the CUDA GPU. I don’t expect investors! 1st step:
bool GenerateSptable() {
// Init SecpK1
Secp256K1 *secp = new Secp256K1();
secp->Init();
int size = 512;
// Compute generator table
Point *Sp = new Point[size];
Int *dS = new Int[size];
Sp[0] = secp->G;
dS[0].SetInt32(1);
for (int i = 1; i < size; i++) {
dS[i].Add(&dS[i-1], &dS[i-1]);
Sp[i] = secp->DoubleAffine(Sp[i-1]);
printf("\nGenerate Sp-table GPUSptable.h size i: %d", i);
}
// Write file
FILE *f = fopen("GPU/GPUSptable.h", "wb");
fprintf(f, "// File generated by Main::GenerateSptable()\n");
fprintf(f, "#define GRP_SIZE %d\n\n", size);
fprintf(f, "// SecpK1 Generator table (Contains G,2G,4G,8G...,(SIZE/2 )...G)\n");
fprintf(f, "__device__ __constant__ uint64_t Spx[][4] = {\n");
for (int i = 0; i < size/2; i++) {
fprintf(f, " %s,\n", Sp[i].x.GetC64Str(4).c_str());
}
fprintf(f, "};\n");
fprintf(f, "__device__ __constant__ uint64_t Spy[][4] = {\n");
for (int i = 0; i < size/2; i++) {
fprintf(f, " %s,\n", Sp[i].y.GetC64Str(4).c_str());
}
fprintf(f, "};\n\n");
fprintf(f, "__device__ __constant__ uint64_t dS[][4] = {\n");
for (int i = 0; i < size/2; i++) {
fprintf(f, " %s,\n", dS[i].GetC64Str(4).c_str());
}
fprintf(f, "};\n\n");
fclose(f);
delete[] Sp;
delete[] dS;
return true;
}
wich file is this step? or wrong question?