Commit 3a95245b authored by Adam P. Goucher's avatar Adam P. Goucher
Browse files

Refactoring

parent 601f04ba
Pipeline #201051262 canceled with stages
in 13 minutes and 42 seconds
......@@ -2,7 +2,7 @@ This program searches random initial configurations in Conway's Game
of Life and periodically uploads results to a remote server. You can
read more information about the distributed search at the following URL:
- https://catagolue.appspot.com/
- https://catagolue.hatsya.com/
An automatic live Twitter feed of new discoveries found by the search
was established by Ivan Fomichev:
......@@ -98,7 +98,7 @@ Then you can enter the directory and compile the search program using:
If the online repository is updated at all, you can update your local
copy in-place by running:
./recompile.sh --update
git pull
in the repository directory.
......
#pragma once
#include <fstream>
#include <algorithm>
#include <cstdlib>
#include "../lifelib/upattern.h"
#include "../lifelib/classifier.h"
#include "../lifelib/incubator.h"
#ifndef PREFIX_VERSION
#define PREFIX_VERSION ""
#endif
#define APG_VERSION PREFIX_VERSION "v5.19-" LIFELIB_VERSION
#include "utilities.h"
#include "params2.h"
#include "md5.h"
#include "payosha256.h"
#include "hashsoup2.h"
#define LIFETREE_MEM 100
#include "detection.h"
#include "stabilise.h"
#include "searcher.h"
#include <iostream>
#include <vector>
#include <sstream>
#include <fstream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <unistd.h>
#ifdef _POSIX_SOURCE
#include <signal.h>
#define handle_error_en(en, msg) do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
#endif
#include "lifelib/upattern.h"
#include "lifelib/classifier.h"
#include "lifelib/incubator.h"
#define APG_VERSION "v5.18-" LIFELIB_VERSION
#include "includes/utilities.h"
#include "includes/params2.h"
#include "includes/base.h"
#ifdef USING_GPU
#ifdef NEW_GPU_ALGO
......@@ -30,18 +8,13 @@
#endif
#endif
#include "includes/md5.h"
#include "includes/payosha256.h"
#include "includes/hashsoup2.h"
#define LIFETREE_MEM 100
#ifdef _POSIX_SOURCE
#include <signal.h>
#define handle_error_en(en, msg) do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
#endif
#include "includes/detection.h"
#include "includes/stabilise.h"
#include "includes/searcher.h"
#include "includes/verification.h"
#include "includes/searching.h"
#include "includes/apgluxe.h"
int main (int argc, char *argv[]) {
......
......@@ -13,7 +13,6 @@ rm -f "includes/params.h" | true
rulearg=`echo "$@" | grep -o "\\-\\-rule [^ ]*" | sed "s/\\-\\-rule\\ //"`
symmarg=`echo "$@" | grep -o "\\-\\-symmetry [^ ]*" | sed "s/\\-\\-symmetry\\ //"`
updatearg=`echo "$@" | grep -o "\\-\\-update" | sed "s/\\-\\-update/u/"`
profilearg=`echo "$@" | grep -o "\\-\\-profile" | sed "s/\\-\\-profile/u/"`
mingwarg=`echo "$@" | grep -o "\\-\\-mingw" | sed "s/\\-\\-mingw/u/"`
gpuarg=`echo "$@" | grep -o "\\-\\-cuda" | sed "s/\\-\\-cuda/u/"`
......@@ -39,25 +38,6 @@ export PROFILE_APGLUXE=1
fi
fi
if ((${#updatearg} != 0)); then
printf "Checking for updates from repository...\033[30m\n"
newversion=`curl "https://gitlab.com/apgoucher/apgmera/raw/master/main.cpp" | grep "define APG_VERSION" | sed "s/#define APG_VERSION //"`
oldversion=`cat main.cpp | grep "define APG_VERSION" | sed "s/#define APG_VERSION //"`
if [ "$newversion" != "$oldversion" ]
then
printf "\033[0m...your copy of apgluxe does not match the repository.\n"
echo "New version: $newversion"
echo "Old version: $oldversion"
bash update-lifelib.sh
git pull
else
printf "\033[0m...your copy of apgluxe is already up-to-date.\n"
fi
else
echo "Skipping updates; use --update to update apgluxe automatically."
fi
# Ensure lifelib matches the version in the repository:
bash update-lifelib.sh
rm -rf "lifelib/avxlife/lifelogic" | true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment