Added more items to the test_data.json while testing multithreading
This commit is contained in:
parent
3523e12a5d
commit
948eef0b4a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
haversine/python/__pycache__/**/*
|
haversine/python/__pycache__/**/*
|
||||||
haversine/cpp/haverscan
|
haversine/cpp/haverscan
|
||||||
haversine/cpp/haverstrtok
|
haversine/cpp/haverstrtok
|
||||||
|
haversine/cpp/test*
|
||||||
haversine/data_10000000_flex.json
|
haversine/data_10000000_flex.json
|
||||||
|
6
Makefile
6
Makefile
@ -10,5 +10,11 @@ mk_haversine_strtok:
|
|||||||
run_haversine_strtok:
|
run_haversine_strtok:
|
||||||
cd ./haversine/cpp && ./haverstrtok
|
cd ./haversine/cpp && ./haverstrtok
|
||||||
|
|
||||||
|
mk_test:
|
||||||
|
clang++ -g -lpthread haversine/cpp/test.cpp haversine/cpp/haversine.cpp -o haversine/cpp/test
|
||||||
|
|
||||||
|
run_test:
|
||||||
|
cd ./haversine/cpp && ./test
|
||||||
|
|
||||||
run_haversine_python_json:
|
run_haversine_python_json:
|
||||||
python ./haversine/python/haversine_json.py
|
python ./haversine/python/haversine_json.py
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define EARTH_RADIUS_KM 6371.0
|
#define EARTH_RADIUS_KM 6371.0
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define ITEM_COUNT 2
|
#define ITEM_COUNT 4
|
||||||
#else
|
#else
|
||||||
#define ITEM_COUNT 10000000
|
#define ITEM_COUNT 10000000
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define EARTH_RADIUS_KM 6371.0
|
#define EARTH_RADIUS_KM 6371.0
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define ITEM_COUNT 2
|
#define ITEM_COUNT 4
|
||||||
#else
|
#else
|
||||||
#define ITEM_COUNT 10000000
|
#define ITEM_COUNT 10000000
|
||||||
#endif
|
#endif
|
||||||
@ -95,10 +95,9 @@ int main(int argc, char *argv[]) {
|
|||||||
ITEM_COUNT / ((double)(end_time - start_time) / CLOCKS_PER_SEC));
|
ITEM_COUNT / ((double)(end_time - start_time) / CLOCKS_PER_SEC));
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
int precision = 16;
|
|
||||||
for (int i = 0; i < ITEM_COUNT; ++i) {
|
for (int i = 0; i < ITEM_COUNT; ++i) {
|
||||||
printf("%.*f\n%.*f\n%.*f\n%.*f\n\n", precision, items[i].x0, precision,
|
printf("%.16f\n%.16f\n%.16f\n%.16f\n\n", items[i].x0, items[i].y0,
|
||||||
items[i].y0, precision, items[i].x1, precision, items[i].y1);
|
items[i].x1, items[i].y1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11,6 +11,18 @@
|
|||||||
"y0": 111.40590001495877,
|
"y0": 111.40590001495877,
|
||||||
"x1": -34.52607922832944,
|
"x1": -34.52607922832944,
|
||||||
"y1": -127.52991299863771
|
"y1": -127.52991299863771
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x0": 82.38926447047004,
|
||||||
|
"y0": -77.16802973849774,
|
||||||
|
"x1": 12.135922031901572,
|
||||||
|
"y1": 119.0180778790745
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x0": 71.91211638992331,
|
||||||
|
"y0": 112.49572232662928,
|
||||||
|
"x1": -13.42478617362913,
|
||||||
|
"y1": -129.76714732643325
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user