added __forceinline__ to device functions

fixed BFM warning ("cannot tell what pointer points to")
This commit is contained in:
Vladislav Vinogradov
2011-06-14 11:27:32 +00:00
parent 79f3260b8e
commit 1c1a61dd37
21 changed files with 978 additions and 908 deletions

View File

@@ -60,27 +60,27 @@ namespace cv { namespace gpu { namespace mathfunc
{
struct Nothing
{
static __device__ void calc(int, int, float, float, float*, size_t, float)
static __device__ __forceinline__ void calc(int, int, float, float, float*, size_t, float)
{
}
};
struct Magnitude
{
static __device__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float)
static __device__ __forceinline__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float)
{
dst[y * dst_step + x] = sqrtf(x_data * x_data + y_data * y_data);
}
};
struct MagnitudeSqr
{
static __device__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float)
static __device__ __forceinline__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float)
{
dst[y * dst_step + x] = x_data * x_data + y_data * y_data;
}
};
struct Atan2
{
static __device__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float scale)
static __device__ __forceinline__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float scale)
{
dst[y * dst_step + x] = scale * atan2f(y_data, x_data);
}
@@ -104,14 +104,14 @@ namespace cv { namespace gpu { namespace mathfunc
struct NonEmptyMag
{
static __device__ float get(const float* mag, size_t mag_step, int x, int y)
static __device__ __forceinline__ float get(const float* mag, size_t mag_step, int x, int y)
{
return mag[y * mag_step + x];
}
};
struct EmptyMag
{
static __device__ float get(const float*, size_t, int, int)
static __device__ __forceinline__ float get(const float*, size_t, int, int)
{
return 1.0f;
}