From e0921847ba72e9b455d81133cddb08b1888d175e Mon Sep 17 00:00:00 2001 From: Danny Chia Date: Tue, 4 Mar 2025 12:36:17 -0800 Subject: [PATCH] account for files generated by -save-temps; minor updates to readme --- .gitignore | 4 ++++ README.txt | 16 ++++++++-------- src/Makefile | 10 +++++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index eb1afcf..a7732dc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,10 @@ src/*.tmp src/depend +# generated by -save-temps +*.i +*.ii + # binaries mfakto *.elf diff --git a/README.txt b/README.txt index 7ff0f6b..4e9b836 100644 --- a/README.txt +++ b/README.txt @@ -36,9 +36,9 @@ Contents 7 Plans -##################### -# 0 What is mfakto? # -##################### +################## +# 0 About mfakto # +################## mfakto is an OpenCL port of mfaktc that aims to have the same features and functions. mfaktc is a program that trial factors Mersenne numbers. It stands @@ -401,12 +401,12 @@ Submitting results: - mfakto can find factors outside the given range. This is because mfakto works on huge factor blocks, controlled by GridSize in - the INI file. The default value GridSize=3 means mfakto runs up to 1048576 + the INI file. The default value of GridSize=3 means mfakto runs up to 1048576 factor candidates at once, per class. So the last block of each class is - filled with factor candidates above the upper limit. This is a huge overhead - for small ranges but can be safely ignored for larger ranges. For example, - the average overhead is 0.5% for a class with 100 blocks but only 0.05% for - one with 1000 blocks. + filled up with factor candidates to above the upper bit level. This is a huge + overhead for small ranges but can be safely ignored for larger ranges. + For example, the average overhead is 0.5% for a class with 100 blocks but + only 0.05% for one with 1000 blocks. ############ # 5 Tuning # diff --git a/src/Makefile b/src/Makefile index 3011b94..beb453c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -112,7 +112,7 @@ all: $(ALL_TARGETS) $(LD) $^ $(LDFLAGS) -o $@ clean: - $(RM) *.o *~ depend + $(RM) *.o *~ depend *.i *.ii sieve.o : sieve.c $(CC) $(CFLAGS) $(CFLAGS_EXTRA_SIEVE) -c $< -o $@ @@ -141,9 +141,13 @@ depend: $(CSRC) mv $@.tmp $@ ifdef MAKECMDGOALS -ifneq ($(MAKECMDGOALS), clean) + goals := $(MAKECMDGOALS) +else + goals := all +endif + +ifneq ($(goals), clean) ifneq (, $(wildcard depend)) include depend endif endif -endif