-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
137 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
echo on | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | ||
echo "USING VISUAL STUDIO 17" | ||
) | ||
) | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
if exist "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" amd64 | ||
echo "USING VISUAL STUDIO 15" | ||
) | ||
) | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
if exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | ||
echo "USING VISUAL STUDIO 14" | ||
) | ||
) | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
if exist "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" amd64 | ||
echo "USING VISUAL STUDIO 13" | ||
) | ||
) | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
if exist "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 | ||
echo "USING VISUAL STUDIO 12" | ||
) | ||
) | ||
|
||
if NOT DEFINED VCINSTALLDIR ( | ||
echo "No compatible visual studio found! run vcvarsall.bat first!" | ||
) | ||
|
||
cl.exe /LD /DDLL_EXPORTS /DNDEBUG gdist_c_api.cpp | ||
ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include <iostream> | ||
#include <fstream> | ||
#include <inttypes.h> | ||
|
||
#include "geodesic_library/geodesic_algorithm_exact.h" | ||
|
||
|
||
#if defined(_WIN32) | ||
# if defined(DLL_EXPORTS) | ||
# define DLL_EXPORT_API __declspec(dllexport) | ||
# else | ||
# define DLL_EXPORT_API __declspec(dllimport) | ||
# endif | ||
#else | ||
# define DLL_EXPORT_API | ||
#endif | ||
|
||
|
||
void compute_gdist_impl( | ||
unsigned number_of_vertices, | ||
unsigned number_of_triangles, | ||
double *vertices, | ||
int *triangles, | ||
unsigned number_of_source_indices, | ||
unsigned number_of_target_indices, | ||
unsigned *source_indices_array, | ||
unsigned *target_indices_array, | ||
double *distance, | ||
double distance_limit | ||
); | ||
|
||
double* local_gdist_matrix_impl( | ||
unsigned number_of_vertices, | ||
unsigned number_of_triangles, | ||
double *vertices, | ||
unsigned *triangles, | ||
unsigned *sparse_matrix_size, | ||
double max_distance | ||
); | ||
|
||
extern "C" { | ||
DLL_EXPORT_API void compute_gdist( | ||
unsigned number_of_vertices, | ||
unsigned number_of_triangles, | ||
double *vertices, | ||
int *triangles, | ||
unsigned number_of_source_indices, | ||
unsigned number_of_target_indices, | ||
unsigned *source_indices_array, | ||
unsigned *target_indices_array, | ||
double *distance, | ||
double distance_limit | ||
); | ||
|
||
DLL_EXPORT_API double* local_gdist_matrix( | ||
unsigned number_of_vertices, | ||
unsigned number_of_triangles, | ||
double *vertices, | ||
unsigned *triangles, | ||
unsigned *sparse_matrix_size, | ||
double max_distance | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "numpy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters