-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backend shared lib build to cmake
- Loading branch information
Showing
6 changed files
with
173 additions
and
63 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 |
---|---|---|
@@ -1,19 +1,27 @@ | ||
#pragma once | ||
|
||
#include "Vec.h" | ||
#include <memory.h> | ||
#include <complex> | ||
#ifdef _WIN32 | ||
#define DLL_EXPORT_API __declspec(dllexport) | ||
#define DLL_IMPORT_API __declspec(dllimport) | ||
#else | ||
#define DLL_EXPORT_API __attribute__((__visibility("default"))) | ||
#define DLL_IMPORT_API | ||
#endif | ||
|
||
#ifdef IMAGE_PROCESSOR_DLL | ||
#ifdef IMAGE_PROCESSOR_INTERNAL | ||
#define IMAGE_PROCESSOR_API __declspec(dllexport) | ||
#else | ||
#define IMAGE_PROCESSOR_API __declspec(dllimport) | ||
#endif // IMAGE_PROCESSOR_INTERNAL | ||
#ifdef IMAGE_PROCESSOR_EXPORT | ||
#define IMAGE_PROCESSOR_API DLL_EXPORT_API | ||
#else | ||
#define IMAGE_PROCESSOR_API DLL_IMPORT_API | ||
#endif // IMAGE_PROCESSOR_EXPORT | ||
#else | ||
#define IMAGE_PROCESSOR_API | ||
#define IMAGE_PROCESSOR_API | ||
#endif // IMAGE_PROCESSOR_DLL | ||
|
||
#include "Vec.h" | ||
#include <memory.h> | ||
#include <complex> | ||
|
||
IMAGE_PROCESSOR_API float* createEllipsoidKernel(Vec<std::size_t> radii, Vec<std::size_t>& kernelDims); | ||
|
||
IMAGE_PROCESSOR_API int calcOtsuThreshold(const double* normHistogram, int numBins); |
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 |
---|---|---|
@@ -1,40 +1,48 @@ | ||
#pragma once | ||
#include "Vec.h" | ||
#include "CudaDeviceStats.h" | ||
#include "ImageView.h" | ||
|
||
#include <limits> | ||
#include <algorithm> | ||
|
||
|
||
#ifdef IMAGE_PROCESSOR_DLL | ||
#ifdef IMAGE_PROCESSOR_INTERNAL | ||
#define IMAGE_PROCESSOR_API __declspec(dllexport) | ||
#else | ||
#define IMAGE_PROCESSOR_API __declspec(dllimport) | ||
#endif // IMAGE_PROCESSOR_INTERNAL | ||
#else | ||
#define IMAGE_PROCESSOR_API | ||
#endif // IMAGE_PROCESSOR_DLL | ||
|
||
|
||
#include "CWrapperAutogen.h" | ||
|
||
|
||
IMAGE_PROCESSOR_API void clearDevice(); | ||
|
||
IMAGE_PROCESSOR_API int deviceCount(); | ||
IMAGE_PROCESSOR_API int deviceStats(DevStats** stats); | ||
IMAGE_PROCESSOR_API int memoryStats(std::size_t** stats); | ||
|
||
|
||
/// Example wrapper header calls | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<bool> imageIn, ImageView<bool> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<char> imageIn, ImageView<char> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned char> imageIn, ImageView<unsigned char> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<short> imageIn, ImageView<short> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned short> imageIn, ImageView<unsigned short> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<int> imageIn, ImageView<int> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned int> imageIn, ImageView<unsigned int> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<float> imageIn, ImageView<float> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<double> imageIn, ImageView<double> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
#pragma once | ||
|
||
#ifdef _WIN32 | ||
#define DLL_EXPORT_API __declspec(dllexport) | ||
#define DLL_IMPORT_API __declspec(dllimport) | ||
#else | ||
#define DLL_EXPORT_API __attribute__((visibility("default"))) | ||
#define DLL_IMPORT_API | ||
#endif | ||
|
||
#ifdef IMAGE_PROCESSOR_DLL | ||
#ifdef IMAGE_PROCESSOR_EXPORT | ||
#define IMAGE_PROCESSOR_API DLL_EXPORT_API | ||
#else | ||
#define IMAGE_PROCESSOR_API DLL_IMPORT_API | ||
#endif // IMAGE_PROCESSOR_EXPORT | ||
#else | ||
#define IMAGE_PROCESSOR_API | ||
#endif // IMAGE_PROCESSOR_DLL | ||
|
||
|
||
#include <limits> | ||
#include <algorithm> | ||
|
||
#include "Vec.h" | ||
#include "ImageView.h" | ||
#include "CudaDeviceStats.h" | ||
|
||
#include "CWrapperAutogen.h" | ||
|
||
|
||
IMAGE_PROCESSOR_API void clearDevice(); | ||
|
||
IMAGE_PROCESSOR_API int deviceCount(); | ||
IMAGE_PROCESSOR_API int deviceStats(DevStats** stats); | ||
IMAGE_PROCESSOR_API int memoryStats(std::size_t** stats); | ||
|
||
|
||
/// Example wrapper header calls | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<bool> imageIn, ImageView<bool> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<char> imageIn, ImageView<char> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned char> imageIn, ImageView<unsigned char> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<short> imageIn, ImageView<short> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned short> imageIn, ImageView<unsigned short> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<int> imageIn, ImageView<int> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<unsigned int> imageIn, ImageView<unsigned int> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<float> imageIn, ImageView<float> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); | ||
//IMAGE_PROCESSOR_API void fooFilter(const ImageView<double> imageIn, ImageView<double> imageOut, ImageView<float> kernel, int numIterations = 1, int device = -1); |
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