Added basic command line arguments parsing + added build/* to gitignore + renamed CMake executable from main to BPE
This commit is contained in:
+1
-34
@@ -1,34 +1 @@
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
build/*
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ project(SwaggGPT LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-O3")
|
||||
|
||||
add_executable(main src/main.cpp)
|
||||
add_executable(BPE src/bpe.cpp)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#include <iostream>
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
// Check for right number of arguments (2 arguments)
|
||||
if (argc != 3) {
|
||||
std::cout << "Syntax: BPE path/to/vocabulary path/to/corpus\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string vocabularyPath(argv[1]);
|
||||
std::string corpusPath(argv[2]);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
|
||||
std::cout << "hello world !\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user