Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f902d7

Browse files
committed
Restruct. for adaptive int and reduced overhead
Changed template arguments in includes Changed the templates arguments in the examples Unsigned integer with different sizes New repository structure temp save Still a core dumped error to solve for ClassicalStack Added target in MakeFile for 8,16,32,64 and extras versions
1 parent ceeb686 commit 3f902d7

29 files changed

+1694
-1142
lines changed

‎CMakeLists.txt‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,34 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wshadow")
4545
# Might need to be fixed for retrocompatibility or temporary
4646
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++0x-compat -Wno-unused")
4747

48-
#Bring the headers of the header-only CompressedStack library into the project
49-
include_directories(
50-
${PROJECT_SOURCE_DIR}/include
51-
${PROJECT_SOURCE_DIR}/examples/convexhull/include ${PROJECT_SOURCE_DIR}/examples/testrun/include
52-
)
5348

5449
# Test directories
5550
get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
5651
message("inc_dirs = ${inc_dirs}")
5752

58-
# Convex Hull
59-
file(GLOB SOURCES "examples/convexhull/*.cpp")
60-
add_executable(convexhull ${SOURCES})
53+
# Convex Hulls : 8, 16, 32 or 64 bits and the version with extras
54+
file(GLOB SOURCES "examples/convexhull/convexHull8.cpp")
55+
add_executable(convexhull8 ${SOURCES})
56+
file(GLOB SOURCES "examples/convexhull/convexHull16.cpp")
57+
add_executable(convexhull16 ${SOURCES})
58+
file(GLOB SOURCES "examples/convexhull/convexHull32.cpp")
59+
add_executable(convexhull32 ${SOURCES})
60+
file(GLOB SOURCES "examples/convexhull/convexHull64.cpp")
61+
add_executable(convexhull64 ${SOURCES})
62+
file(GLOB SOURCES "examples/convexhull/convexHullExtras.cpp")
63+
add_executable(convexhullextras ${SOURCES})
6164

62-
# Test Run
63-
file(GLOB SOURCES "examples/testrun/*.cpp")
64-
add_executable(testrun ${SOURCES})
65+
# Test Run : 8, 16, 32 or 64 bits and the version with extras
66+
file(GLOB SOURCES "examples/testrun/testrun8.cpp")
67+
add_executable(testrun8 ${SOURCES})
68+
file(GLOB SOURCES "examples/testrun/testrun16.cpp")
69+
add_executable(testrun16 ${SOURCES})
70+
file(GLOB SOURCES "examples/testrun/testrun32.cpp")
71+
add_executable(testrun32 ${SOURCES})
72+
file(GLOB SOURCES "examples/testrun/testrun64.cpp")
73+
add_executable(testrun64 ${SOURCES})
74+
file(GLOB SOURCES "examples/testrun/testrunExtras.cpp")
75+
add_executable(testrunextras ${SOURCES})
6576

6677

6778
# Description of the different builds

‎examples/convexhull/convexHull.cpp‎

Lines changed: 0 additions & 199 deletions
This file was deleted.

‎examples/convexhull/convexHull16.cpp‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ConvexHull : Implementation
2+
3+
/*==============================================================================
4+
Includes
5+
==============================================================================*/
6+
#include "include/convexHull.hpp"
7+
#include <cstdint>
8+
9+
/*==============================================================================
10+
Type alias for the different integer size (based on the size of the input)
11+
==============================================================================*/
12+
13+
// using ConvexHull8 = ConvexHull<std::uint_least8_t>;
14+
using ConvexHull16 = ConvexHull<std::uint_least16_t>;
15+
// using ConvexHull32 = ConvexHull<std::uint_least32_t>;
16+
// using ConvexHull64 = ConvexHull<std::uint_least64_t>;
17+
18+
/*==============================================================================
19+
How to use
20+
* argv[1] is the file name
21+
==============================================================================*/
22+
int main(int argc, char *argv[]) {
23+
// Getting the path of the instance to test
24+
std::string filepath = argv[1];
25+
26+
ConvexHull16 stack(filepath);
27+
stack.run();
28+
stack.println();
29+
30+
return 0;
31+
}

‎examples/convexhull/convexHull32.cpp‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ConvexHull : Implementation
2+
3+
/*==============================================================================
4+
Includes
5+
==============================================================================*/
6+
#include "include/convexHull.hpp"
7+
#include <cstdint>
8+
9+
/*==============================================================================
10+
Type alias for the different integer size (based on the size of the input)
11+
==============================================================================*/
12+
13+
// using ConvexHull8 = ConvexHull<std::uint_least8_t>;
14+
// using ConvexHull16 = ConvexHull<std::uint_least16_t>;
15+
using ConvexHull32 = ConvexHull<std::uint_least32_t>;
16+
// using ConvexHull64 = ConvexHull<std::uint_least64_t>;
17+
18+
/*==============================================================================
19+
How to use
20+
* argv[1] is the file name
21+
==============================================================================*/
22+
int main(int argc, char *argv[]) {
23+
// Getting the path of the instance to test
24+
std::string filepath = argv[1];
25+
26+
ConvexHull32 stack(filepath);
27+
stack.run();
28+
stack.println();
29+
30+
return 0;
31+
}

‎examples/convexhull/convexHull64.cpp‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ConvexHull : Implementation
2+
3+
/*==============================================================================
4+
Includes
5+
==============================================================================*/
6+
#include "include/convexHull.hpp"
7+
#include <cstdint>
8+
9+
/*==============================================================================
10+
Type alias for the different integer size (based on the size of the input)
11+
==============================================================================*/
12+
13+
// using ConvexHull8 = ConvexHull<std::uint_least8_t>;
14+
// using ConvexHull16 = ConvexHull<std::uint_least16_t>;
15+
// using ConvexHull32 = ConvexHull<std::uint_least32_t>;
16+
using ConvexHull64 = ConvexHull<std::uint_least64_t>;
17+
18+
/*==============================================================================
19+
How to use
20+
* argv[1] is the file name
21+
==============================================================================*/
22+
int main(int argc, char *argv[]) {
23+
// Getting the path of the instance to test
24+
std::string filepath = argv[1];
25+
26+
ConvexHull64 stack(filepath);
27+
stack.run();
28+
stack.println();
29+
30+
return 0;
31+
}

‎examples/convexhull/convexHull8.cpp‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ConvexHull : Implementation
2+
3+
/*==============================================================================
4+
Includes
5+
==============================================================================*/
6+
#include "include/convexHull.hpp"
7+
#include <cstdint>
8+
9+
/*==============================================================================
10+
Type alias for the different integer size (based on the size of the input)
11+
==============================================================================*/
12+
13+
using ConvexHull8 = ConvexHull<std::uint_least8_t>;
14+
// using ConvexHull16 = ConvexHull<std::uint_least16_t>;
15+
// using ConvexHull32 = ConvexHull<std::uint_least32_t>;
16+
// using ConvexHull64 = ConvexHull<std::uint_least64_t>;
17+
18+
/*==============================================================================
19+
How to use
20+
* argv[1] is the file name
21+
==============================================================================*/
22+
int main(int argc, char *argv[]) {
23+
// Getting the path of the instance to test
24+
std::string filepath = argv[1];
25+
26+
ConvexHull8 stack(filepath);
27+
stack.run();
28+
stack.println();
29+
30+
return 0;
31+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /