@@ -130,7 +130,6 @@ from 2^66 to 2^67. The OpenCL version, mfakto, requires MORE_CLASSES be defined.
130130#define MORE_CLASSES
131131
132132
133-
134133/*
135134THREADS_PER_BLOCK is not needed for OpenCL - it dynamically uses the device's maximum
136135All GPU-sieve kernels also have 256 threads per block.
@@ -139,7 +138,6 @@ All GPU-sieve kernels also have 256 threads per block.
139138//#define THREADS_PER_BLOCK 256
140139
141140
142-
143141/*
144142SIEVE_PRIMES defines how far we sieve the factor candidates.
145143The first <SIEVE_PRIMES> odd primes are sieved.
@@ -213,7 +211,7 @@ Larger values may lead to less wasted cycles by reducing the number of times all
213211are not TFing a candidate. However, more shared memory is used which may reduce occupancy.
214212Smaller values should lead to a more responsive system (each kernel takes less time to execute).
215213
216- The actual configuration is done in mfaktc .ini.
214+ The actual configuration is done in mfakto .ini.
217215The following lines define the min, default and max value.
218216*/
219217
@@ -229,15 +227,22 @@ The following lines define the min, default and max value.
229227#define GPU_SIEVE_PROCESS_SIZE_DEFAULT 16 /* Default is processing 16K bits */
230228#define GPU_SIEVE_PROCESS_SIZE_MAX 32 /* Upper limit is 64K, since we store k values as "short". Shared memory requirements limit usable values */
231229
232- /* For worktodo.txt files */
233- #define MAX_LINE_LENGTH 100
230+ /* settings related to worktodo.txt file */
231+ #define WORKTODO_FILE "worktodo.txt" // should not exceed 50 characters
232+ #define MAX_LINE_LENGTH 100
233+
234+ #define MAX_FACTORS_PER_JOB 20
235+ #define MAX_DEZ_96_STRING_LENGTH 30 // unsigned int96 can have up to 29 digits + 1 byte for NUL
234236
235- #define MAX_FACTORS_PER_JOB 20
236- #define MAX_DEZ_96_STRING_LENGTH 30 // max value of int96 (unsigned) has 29 digits + 1 byte for NUL
237+ #define MAX_FACTOR_BUFFER_LENGTH MAX_FACTORS_PER_JOB * MAX_DEZ_96_STRING_LENGTH
238+ #define MAX_BUFFER_LENGTH MAX_FACTOR_BUFFER_LENGTH + 100
237239
238- #define MAX_FACTOR_BUFFER_LENGTH MAX_FACTORS_PER_JOB * MAX_DEZ_96_STRING_LENGTH
239- #define MAX_BUFFER_LENGTH MAX_FACTOR_BUFFER_LENGTH + 100
240+ /* other files */
241+ #define CFG_FILE "mfakto.ini"
242+ #define RESULTS_FILE "results.txt"
243+ #define RESULTS_JSON_FILE "results.json.txt"
240244
241- #define GHZDAYS_MAGIC_TF_TOP 0.016968 // magic constant for TF to 65 bits and above
242- #define GHZDAYS_MAGIC_TF_MID 0.017832 // magic constant for 63 and 64 bits
243- #define GHZDAYS_MAGIC_TF_BOT 0.011160 // magic constant for 62 bits and below
245+ /* for GHz-day calculations */
246+ #define GHZDAYS_MAGIC_TF_TOP 0.016968 // magic constant for TF to 65 bits and above
247+ #define GHZDAYS_MAGIC_TF_MID 0.017832 // magic constant for 63 and 64 bits
248+ #define GHZDAYS_MAGIC_TF_BOT 0.011160 // magic constant for 62 bits and below
0 commit comments