Skip to content

Commit e80e8ab

Browse files
committed
Added Google double conversion.
1 parent e6a8c39 commit e80e8ab

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "scalarvssimd/rapidjson"]
22
path = scalarvssimd/rapidjson
33
url = https://github.com/Tencent/rapidjson.git
4+
[submodule "dependencies/double-conversion"]
5+
path = dependencies/double-conversion
6+
url = https://github.com/google/double-conversion.git

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,26 @@
66

77
.PHONY: clean cleandist
88

9-
CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow
9+
CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release/libdouble-conversion.a
1010
#CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Wno-implicit-function-declaration
1111

1212
EXECUTABLES=parse
1313

1414
EXTRA_EXECUTABLES=parsenocheesy parsenodep8
1515

16-
all: $(EXECUTABLES)
16+
17+
LIBS=dependencies/double-conversion/release/libdouble-conversion.a
18+
19+
all: $(EXECUTABLES) $(LIBS)
1720
-./parse
1821

22+
dependencies/double-conversion/release/libdouble-conversion.a : dependencies/double-conversion/README.md
23+
cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make
24+
1925
parse: main.cpp common_defs.h linux-perf-events.h
2026
$(CXX) $(CXXFLAGS) -o parse main.cpp
2127

22-
testflatten: parse parsenocheesy parsenodep8
28+
testflatten: parse parsenocheesy parsenodep8
2329
for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \
2430
echo $$filename ; \
2531
set -x; \
@@ -35,6 +41,8 @@ parsenocheesy: main.cpp common_defs.h linux-perf-events.h
3541
parsenodep8: main.cpp common_defs.h linux-perf-events.h
3642
$(CXX) $(CXXFLAGS) -o parsenodep8 main.cpp -DNO_PDEP_PLEASE -DNO_PDEP_WIDTH=8
3743

44+
dependencies/double-conversion/README.md:
45+
git pull && git submodule init && git submodule update && git submodule status
3846

3947
clean:
4048
rm -f $(EXECUTABLES) $(EXTRA_EXECUTABLES)

dependencies/double-conversion

Submodule double-conversion added at 9a8e518

main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <algorithm>
1919
#include <x86intrin.h>
2020
#include <assert.h>
21+
#include "double-conversion/double-conversion.h"
2122
#include "common_defs.h"
2223
#include "linux-perf-events.h"
2324

0 commit comments

Comments
 (0)