Skip to content

Commit 44f3981

Browse files
committed
Updating amalgamation script.
1 parent 3640ab9 commit 44f3981

File tree

4 files changed

+749
-661
lines changed

4 files changed

+749
-661
lines changed

amalgamation.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ $SCRIPTPATH/src/jsonminifier.cpp
1818
$SCRIPTPATH/src/jsonparser.cpp
1919
$SCRIPTPATH/src/stage1_find_marks.cpp
2020
$SCRIPTPATH/src/stage2_build_tape.cpp
21+
$SCRIPTPATH/src/parsedjson.cpp
22+
$SCRIPTPATH/src/parsedjsoniterator.cpp
2123
"
2224

2325
# order matters
@@ -94,7 +96,7 @@ cat <<< '
9496
#include "simdjson.h"
9597
#include "simdjson.cpp"
9698
int main(int argc, char *argv[]) {
97-
const char * filename = argv[1];
99+
const char * filename = argv[1];
98100
std::string_view p = get_corpus(filename);
99101
ParsedJson pj = build_parsed_json(p); // do the parsing
100102
if( ! pj.isValid() ) {
@@ -117,7 +119,7 @@ echo "Giving final instructions:"
117119
CPPBIN=${DEMOCPP%%.*}
118120

119121
echo "Try :"
120-
echo "c++ -march=native -O3 -std=c++11 -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} jsonexamples/twitter.json "
122+
echo "c++ -march=native -O3 -std=c++11 -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json "
121123

122124
SINGLEHDR=$SCRIPTPATH/singleheader
123125
echo "Copying files to $SCRIPTPATH/singleheader "
@@ -126,9 +128,10 @@ echo "c++ -march=native -O3 -std=c++11 -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} .
126128
cp ${AMAL_C} ${AMAL_H} ${DEMOCPP} $SINGLEHDR
127129
ls $SINGLEHDR
128130

131+
cd $SINGLEHDR && c++ -march=native -O3 -std=c++11 -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json
132+
129133
lowercase(){
130134
echo "$1" | tr 'A-Z' 'a-z'
131135
}
132136

133137
OS=`lowercase \`uname\``
134-

singleheader/amalgamation_demo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/* auto-generated on Fri 4 Jan 2019 20:12:48 EST. Do not edit! */
1+
/* auto-generated on Fri 22 Feb 2019 15:42:34 EST. Do not edit! */
22

33
#include <iostream>
44
#include "simdjson.h"
55
#include "simdjson.cpp"
66
int main(int argc, char *argv[]) {
7-
const char * filename = argv[1];
7+
const char * filename = argv[1];
88
std::string_view p = get_corpus(filename);
99
ParsedJson pj = build_parsed_json(p); // do the parsing
1010
if( ! pj.isValid() ) {

0 commit comments

Comments
 (0)