Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
smortezah committed Apr 6, 2020
1 parent e1e8eea commit a8a87e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
10 changes: 4 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ endif()
# set(CMAKE_CXX_COMPILER C:\\MinGW\\bin\\g++.exe)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -O3 -Wall -ffast-math -fno-math-errno -funsafe-math-optimizations -ffinite-math-only -fbranch-target-load-optimize -fforce-addr -march=native")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -fopenmp -O3 -Wall -ffast-math -fno-math-errno -funsafe-math-optimizations -ffinite-math-only -fbranch-target-load-optimize -fforce-addr -march=native")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -Wall -O0 -g")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -O3 -pg") # mem prof
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -O3 -fopenmp -D_GLIBCXX_PARALLEL")

add_executable(smashpp
par.cpp
Expand All @@ -35,13 +33,13 @@ add_executable(smashpp
main.cpp
)

#add_executable(smashpp-inv-rep src/invRep.cpp)

#add_executable(excule_N src/excludeN.cpp)

target_compile_features(smashpp PRIVATE cxx_std_14)

find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(smashpp PRIVATE OpenMP::OpenMP_CXX)
endif()

add_executable(smashpp-inv-rep invRep.cpp)

add_executable(exclude_N excludeN.cpp)
15 changes: 9 additions & 6 deletions src/excludeN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
// Morteza Hosseini [email protected]
// Copyright (C) 2018-2020, IEETA, University of Aveiro, Portugal.

#include <iostream>
#include <fstream>
#include "def.hpp"
#include <iostream>

#include "par.hpp"
using namespace smashpp;

int main(int argc, char* argv[]) {
for (std::vector<char> buffer(FILE_BUF, 0); cin;) {
cin.read(buffer.data(), FILE_BUF);
for (std::vector<char> buffer(FILE_READ_BUF, 0); std::cin;) {
std::cin.read(buffer.data(), FILE_READ_BUF);
std::string out;
for (auto it = begin(buffer); it != begin(buffer) + cin.gcount(); ++it) {
for (auto it = begin(buffer); it != begin(buffer) + std::cin.gcount();
++it) {
if (*it != 'N') out += *it;
}
cout.write(out.data(), out.size());
std::cout.write(out.data(), out.size());
}

return 0;
Expand Down
6 changes: 1 addition & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// Smash++
// Morteza Hosseini [email protected]
// Diogo Pratas [email protected]
// Burkhard Morgenstern [email protected]
// Armando J. Pinho [email protected]
// Morteza Hosseini [email protected]
// Copyright (C) 2018-2020, IEETA, University of Aveiro, Portugal.

#define __STDC_FORMAT_MACROS
Expand All @@ -13,7 +10,6 @@
#endif

#include "application.hpp"

using namespace smashpp;

int main(int argc, char* argv[]) {
Expand Down

0 comments on commit a8a87e3

Please sign in to comment.