diff --git a/.gitignore b/.gitignore index b96fa5c..a8c5689 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ -build/ .vscode/ -*.o \ No newline at end of file +*.o +*.sh +main +yggm \ No newline at end of file diff --git a/README.md b/README.md index 7fb1a9a..d75b09d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ cmake -B build && cmake --build build -j$(nproc) build/yggm -t 10 ``` # ToDo -- [x] Cuda support (slow) +- [x] Cuda support (not optimized) - [x] Support for avx2 - [ ] Support for sse4 # \ No newline at end of file diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 0000000..44f2703 --- /dev/null +++ b/build/Makefile @@ -0,0 +1,18 @@ +NVCC := nvcc +NVCC_FLAGS := -O3 -use_fast_math -Xptxas -O3 -gencode arch=compute_75,code=sm_75 \ + --default-stream per-thread -Wno-deprecated-gpu-targets --expt-relaxed-constexpr -I../libs/ +MAIN_SOURCE := ../sources/main.cu +LIBS_DIR := ../libs/ +BUILD_DIR := ../build/ +LIBS_SOURCES := $(wildcard $(LIBS_DIR)*.cu) +LIBS_OBJECTS := $(patsubst $(LIBS_DIR)%.cu,$(BUILD_DIR)/%.o,$(LIBS_SOURCES)) +TARGET := main +all: $(TARGET) +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) +$(TARGET): $(MAIN_SOURCE) $(LIBS_OBJECTS) + $(NVCC) $(NVCC_FLAGS) -o $(TARGET) $(MAIN_SOURCE) $(LIBS_OBJECTS) +$(BUILD_DIR)/%.o: $(LIBS_DIR)%.cu | $(BUILD_DIR) + $(NVCC) $(NVCC_FLAGS) -c $< -o $@ +#clean: +# rm -f $(BUILD_DIR)/*.o \ No newline at end of file diff --git a/sources/main.cu b/sources/main.cu index 781068c..889f0b0 100644 --- a/sources/main.cu +++ b/sources/main.cu @@ -4,10 +4,10 @@ #include #include #include -#include "../libs/sha512.cuh" +#include #include -#include "../libs/ed25519.cuh" -#include "../libs/edsign.cuh" +#include +#include __device__ __constant__ char hexDigitsConst[17] = "0123456789abcdef"; using Address = unsigned char[16]; using Key = unsigned char[32];