scisoftdev-tmp-HiPOP 1.0.10__tar.gz → 1.0.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/PKG-INFO +1 -1
- scisoftdev_tmp_hipop-1.0.11/VERSION.txt +1 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/src/shortest_path.cpp +18 -7
- scisoftdev_tmp_hipop-1.0.11/python/hipop/shortest_path.py +1 -0
- scisoftdev_tmp_hipop-1.0.10/VERSION.txt +0 -1
- scisoftdev_tmp_hipop-1.0.10/python/hipop/shortest_path.py +0 -68
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/.github/workflows/ci.yaml +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/.github/workflows/deploy.yaml +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/.gitignore +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/LICENSE +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/README.md +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/conda/env.yaml +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/cmake/HipopConfig.cmake.in +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/examples/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/examples/ParallelKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/include/hipop/create.h +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/include/hipop/graph.h +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/include/hipop/shortest_path.h +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/src/create.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/src/graph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/helpers.h +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testCopyGraph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testDijkstra1.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testDijkstra2.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testGraph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testGraphMerge.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testManhattan.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testYenKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testparallelKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/pyproject.toml +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/pytest.toml +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/examples/UpdateCosts.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/examples/ksp.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/examples/merge.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/examples/test.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/__init__.py.template +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/cpp/graph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/cpp/main.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/cpp/shortest_path.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/graph.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/render.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/tests/test_Graph.py +0 -0
- {scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/tests/test_VersionConsistency.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.11
|
|
@@ -381,10 +381,12 @@ namespace hipop
|
|
|
381
381
|
std::vector<std::string> origins,
|
|
382
382
|
std::vector<std::string> destinations,
|
|
383
383
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
384
|
-
std::string cost,
|
|
385
|
-
int,
|
|
384
|
+
std::string cost,
|
|
385
|
+
int threadNumber,
|
|
386
386
|
std::vector<setstring> vecAvailableLabels)
|
|
387
387
|
{
|
|
388
|
+
omp_set_num_threads(threadNumber);
|
|
389
|
+
|
|
388
390
|
int nbPath = origins.size();
|
|
389
391
|
std::vector<int> emptyV;
|
|
390
392
|
std::vector<int> uniqueIndices;
|
|
@@ -434,9 +436,11 @@ namespace hipop
|
|
|
434
436
|
std::vector<std::string> origins,
|
|
435
437
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
436
438
|
std::string cost,
|
|
437
|
-
int,
|
|
439
|
+
int threadNumber,
|
|
438
440
|
std::vector<setstring> vecAvailableLabels)
|
|
439
441
|
{
|
|
442
|
+
omp_set_num_threads(threadNumber);
|
|
443
|
+
|
|
440
444
|
int nbSPTs = origins.size();
|
|
441
445
|
std::vector<ShortestPathsTree> res(nbSPTs);
|
|
442
446
|
|
|
@@ -474,9 +478,11 @@ namespace hipop
|
|
|
474
478
|
std::vector<std::string> destinations,
|
|
475
479
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
476
480
|
std::vector<std::string> costs,
|
|
477
|
-
int,
|
|
481
|
+
int threadNumber,
|
|
478
482
|
std::vector<setstring> vecAvailableLabels)
|
|
479
483
|
{
|
|
484
|
+
omp_set_num_threads(threadNumber);
|
|
485
|
+
|
|
480
486
|
std::vector<int> emptyV;
|
|
481
487
|
std::vector<int> uniqueIndices;
|
|
482
488
|
std::unordered_map<int, int> duplicateIndices;
|
|
@@ -698,8 +704,9 @@ namespace hipop
|
|
|
698
704
|
const std::vector<std::vector<std::vector<std::string>>> &paths,
|
|
699
705
|
const std::string &cost,
|
|
700
706
|
const std::unordered_map<std::string, std::string> mapLabelCost,
|
|
701
|
-
int)
|
|
707
|
+
int threadNumber)
|
|
702
708
|
{
|
|
709
|
+
omp_set_num_threads(threadNumber);
|
|
703
710
|
int nbBatches = paths.size();
|
|
704
711
|
|
|
705
712
|
std::vector<std::vector<double>> res(nbBatches);
|
|
@@ -1099,8 +1106,10 @@ namespace hipop
|
|
|
1099
1106
|
double costMultiplier,
|
|
1100
1107
|
int maxRetry,
|
|
1101
1108
|
const std::vector<int> &kPaths,
|
|
1102
|
-
int)
|
|
1109
|
+
int threadNumber)
|
|
1103
1110
|
{
|
|
1111
|
+
omp_set_num_threads(threadNumber);
|
|
1112
|
+
|
|
1104
1113
|
int nbODs = origins.size();
|
|
1105
1114
|
std::vector<std::vector<pathCost>> res(nbODs);
|
|
1106
1115
|
OrientedGraph *privateG;
|
|
@@ -1308,7 +1317,7 @@ namespace hipop
|
|
|
1308
1317
|
std::vector<std::string> destinations,
|
|
1309
1318
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
1310
1319
|
std::string cost,
|
|
1311
|
-
int,
|
|
1320
|
+
int threadNumber,
|
|
1312
1321
|
std::pair<std::unordered_set<std::string>, std::unordered_set<std::string>> pairMandatoryLabels,
|
|
1313
1322
|
double maxDiffCost,
|
|
1314
1323
|
double maxDistInCommon,
|
|
@@ -1438,6 +1447,8 @@ namespace hipop
|
|
|
1438
1447
|
}
|
|
1439
1448
|
|
|
1440
1449
|
// Launch dijkstra algo for each OD in parallel
|
|
1450
|
+
omp_set_num_threads(threadNumber);
|
|
1451
|
+
|
|
1441
1452
|
int nbOD = origins.size();
|
|
1442
1453
|
std::vector<std::vector<pathCost>> res(nbOD);
|
|
1443
1454
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from hipop.cpp.shortest_path import (dijkstra, dijkstra_single_source, floyd_warshall, parallel_dijkstra, parallel_dijkstra_single_source, parallel_dijkstra_heterogeneous_costs, parallel_k_intermodal_shortest_path, k_shortest_path, parallel_k_shortest_path, astar_euclidian_dist, compute_path_length, compute_path_cost, compute_paths_costs)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.0.10
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import functools
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
from hipop.cpp.shortest_path import (
|
|
5
|
-
dijkstra,
|
|
6
|
-
dijkstra_single_source,
|
|
7
|
-
floyd_warshall,
|
|
8
|
-
parallel_dijkstra,
|
|
9
|
-
parallel_dijkstra_single_source,
|
|
10
|
-
parallel_dijkstra_heterogeneous_costs,
|
|
11
|
-
parallel_k_intermodal_shortest_path,
|
|
12
|
-
k_shortest_path,
|
|
13
|
-
parallel_k_shortest_path,
|
|
14
|
-
astar_euclidian_dist,
|
|
15
|
-
compute_path_length,
|
|
16
|
-
compute_path_cost,
|
|
17
|
-
compute_paths_costs,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
_EXPORTED_FUNCTIONS = (
|
|
21
|
-
"dijkstra",
|
|
22
|
-
"dijkstra_single_source",
|
|
23
|
-
"floyd_warshall",
|
|
24
|
-
"parallel_dijkstra",
|
|
25
|
-
"parallel_dijkstra_single_source",
|
|
26
|
-
"parallel_dijkstra_heterogeneous_costs",
|
|
27
|
-
"parallel_k_intermodal_shortest_path",
|
|
28
|
-
"k_shortest_path",
|
|
29
|
-
"parallel_k_shortest_path",
|
|
30
|
-
"astar_euclidian_dist",
|
|
31
|
-
"compute_path_length",
|
|
32
|
-
"compute_path_cost",
|
|
33
|
-
"compute_paths_costs",
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
_stats = {name: {"calls": 0, "total_time": 0.0} for name in _EXPORTED_FUNCTIONS}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def _track_calls(func):
|
|
40
|
-
|
|
41
|
-
@functools.wraps(func)
|
|
42
|
-
def wrapper(*args, **kwargs):
|
|
43
|
-
stats = _stats[func.__name__]
|
|
44
|
-
start = time.perf_counter()
|
|
45
|
-
try:
|
|
46
|
-
return func(*args, **kwargs)
|
|
47
|
-
finally:
|
|
48
|
-
stats["calls"] += 1
|
|
49
|
-
stats["total_time"] += time.perf_counter() - start
|
|
50
|
-
|
|
51
|
-
return wrapper
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for _name in _EXPORTED_FUNCTIONS:
|
|
55
|
-
globals()[_name] = _track_calls(globals()[_name])
|
|
56
|
-
del _name
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def report_hipop_call_stats():
|
|
60
|
-
"""Log the number of invocations and cumulative C++ execution time for each
|
|
61
|
-
exported function that has been called at least once."""
|
|
62
|
-
at_least_one_call = False
|
|
63
|
-
for name, stats in _stats.items():
|
|
64
|
-
if stats["calls"] > 0:
|
|
65
|
-
at_least_one_call = True
|
|
66
|
-
print(f"HiPOP fun {name:<40}: #calls = {stats['calls']:>7}, run time = {stats['total_time']:>12.6f}")
|
|
67
|
-
if not at_least_one_call:
|
|
68
|
-
print("No HiPOP functions were called.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/examples/ParallelKShortestPath.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/include/hipop/shortest_path.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testYenKShortestPath.cpp
RENAMED
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/cpp/tests/testparallelKShortestPath.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/__init__.py.template
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/hipop/cpp/shortest_path.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.10 → scisoftdev_tmp_hipop-1.0.11}/python/tests/test_VersionConsistency.py
RENAMED
|
File without changes
|