Commit 8c057af8 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed windows build

parent da93a1da
...@@ -100,6 +100,9 @@ namespace cv { namespace gpu ...@@ -100,6 +100,9 @@ namespace cv { namespace gpu
typedef unsigned char uchar; typedef unsigned char uchar;
typedef unsigned short ushort; typedef unsigned short ushort;
typedef signed char schar; typedef signed char schar;
#ifdef WIN32
typedef unsigned int uint;
#endif
template<class T> inline void bindTexture(const textureReference* tex, const PtrStepSz<T>& img) template<class T> inline void bindTexture(const textureReference* tex, const PtrStepSz<T>& img)
{ {
......
...@@ -1409,7 +1409,7 @@ namespace arithm ...@@ -1409,7 +1409,7 @@ namespace arithm
{ {
S val; S val;
explicit DivInv(double val_) : val(val_) {} explicit DivInv(S val_) : val(val_) {}
__device__ __forceinline__ D operator ()(T a) const __device__ __forceinline__ D operator ()(T a) const
{ {
......
...@@ -138,10 +138,10 @@ namespace icf { ...@@ -138,10 +138,10 @@ namespace icf {
template<bool isDefaultNum> template<bool isDefaultNum>
__device__ __forceinline__ int fast_angle_bin(const float& dx, const float& dy) __device__ __forceinline__ int fast_angle_bin(const float& dx, const float& dy)
{ {
const float angle_quantum = M_PI / 6.f; const float angle_quantum = CV_PI / 6.f;
float angle = atan2(dx, dy) + (angle_quantum / 2.f); float angle = atan2(dx, dy) + (angle_quantum / 2.f);
if (angle < 0) angle += M_PI; if (angle < 0) angle += CV_PI;
const float angle_scaling = 1.f / angle_quantum; const float angle_scaling = 1.f / angle_quantum;
return static_cast<int>(angle * angle_scaling) % 6; return static_cast<int>(angle * angle_scaling) % 6;
...@@ -175,8 +175,8 @@ namespace icf { ...@@ -175,8 +175,8 @@ namespace icf {
{ {
int i = 3; int i = 3;
float2 bin_vector_i; float2 bin_vector_i;
bin_vector_i.x = ::cos(i * (M_PI / 6.f)); bin_vector_i.x = ::cos(i * (CV_PI / 6.f));
bin_vector_i.y = ::sin(i * (M_PI / 6.f)); bin_vector_i.y = ::sin(i * (CV_PI / 6.f));
const float dot_product = fabs(dx * bin_vector_i.x + dy * bin_vector_i.y); const float dot_product = fabs(dx * bin_vector_i.x + dy * bin_vector_i.y);
if(dot_product > max_dot) if(dot_product > max_dot)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment