Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
32d578f5
Commit
32d578f5
authored
Jul 29, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gridTransform overloads problems
parent
ada858e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
gpu_mat.cu
modules/core/src/cuda/gpu_mat.cu
+5
-5
transform.hpp
...les/cudev/include/opencv2/cudev/grid/detail/transform.hpp
+5
-5
transform.hpp
modules/cudev/include/opencv2/cudev/grid/transform.hpp
+0
-0
No files found.
modules/core/src/cuda/gpu_mat.cu
View file @
32d578f5
...
...
@@ -216,7 +216,7 @@ namespace
template <typename T>
void copyWithMask(const GpuMat& src, const GpuMat& dst, const GpuMat& mask, Stream& stream)
{
gridTransform_< CopyToPolicy<sizeof(typename VecTraits<T>::elem_type)> >(globPtr<T>(src), globPtr<T>(dst), identity<T>(), globPtr<uchar>(mask), stream);
gridTransform
Unary
_< CopyToPolicy<sizeof(typename VecTraits<T>::elem_type)> >(globPtr<T>(src), globPtr<T>(dst), identity<T>(), globPtr<uchar>(mask), stream);
}
}
...
...
@@ -268,14 +268,14 @@ namespace
void setToWithOutMask(const GpuMat& mat, Scalar _scalar, Stream& stream)
{
Scalar_<typename VecTraits<T>::elem_type> scalar = _scalar;
gridTransform(constantPtr(VecTraits<T>::make(scalar.val), mat.rows, mat.cols), globPtr<T>(mat), identity<T>(), stream);
gridTransform
Unary
(constantPtr(VecTraits<T>::make(scalar.val), mat.rows, mat.cols), globPtr<T>(mat), identity<T>(), stream);
}
template <typename T>
void setToWithMask(const GpuMat& mat, const GpuMat& mask, Scalar _scalar, Stream& stream)
{
Scalar_<typename VecTraits<T>::elem_type> scalar = _scalar;
gridTransform(constantPtr(VecTraits<T>::make(scalar.val), mat.rows, mat.cols), globPtr<T>(mat), identity<T>(), globPtr<uchar>(mask), stream);
gridTransform
Unary
(constantPtr(VecTraits<T>::make(scalar.val), mat.rows, mat.cols), globPtr<T>(mat), identity<T>(), globPtr<uchar>(mask), stream);
}
}
...
...
@@ -382,7 +382,7 @@ namespace
typedef typename LargerType<src_elem_type, float>::type larger_elem_type;
typedef typename LargerType<float, dst_elem_type>::type scalar_type;
gridTransform_< ConvertToPolicy<scalar_type> >(globPtr<T>(src), globPtr<D>(dst), saturate_cast_func<T, D>(), stream);
gridTransform
Unary
_< ConvertToPolicy<scalar_type> >(globPtr<T>(src), globPtr<D>(dst), saturate_cast_func<T, D>(), stream);
}
template <typename T, typename D, typename S> struct Convertor : unary_function<T, D>
...
...
@@ -408,7 +408,7 @@ namespace
op.alpha = cv::saturate_cast<scalar_type>(alpha);
op.beta = cv::saturate_cast<scalar_type>(beta);
gridTransform_< ConvertToPolicy<scalar_type> >(globPtr<T>(src), globPtr<D>(dst), op, stream);
gridTransform
Unary
_< ConvertToPolicy<scalar_type> >(globPtr<T>(src), globPtr<D>(dst), op, stream);
}
}
...
...
modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp
View file @
32d578f5
...
...
@@ -217,7 +217,7 @@ namespace grid_transform_detail
}
template
<
int
SHIFT
,
typename
SrcType1
,
typename
SrcType2
,
typename
DstType
,
class
BinOp
,
class
MaskPtr
>
__global__
void
transformSmart
(
const
GlobPtr
<
SrcType1
>
src1_
,
const
GlobPtr
<
SrcType2
>
src2_
,
PtrStep
<
DstType
>
dst_
,
const
BinOp
op
,
const
MaskPtr
mask
,
const
int
rows
,
const
int
cols
)
__global__
void
transformSmart
(
const
GlobPtr
<
SrcType1
>
src1_
,
const
GlobPtr
<
SrcType2
>
src2_
,
GlobPtr
<
DstType
>
dst_
,
const
BinOp
op
,
const
MaskPtr
mask
,
const
int
rows
,
const
int
cols
)
{
typedef
typename
MakeVec
<
SrcType1
,
SHIFT
>::
type
read_type1
;
typedef
typename
MakeVec
<
SrcType2
,
SHIFT
>::
type
read_type2
;
...
...
@@ -345,25 +345,25 @@ namespace grid_transform_detail
};
template
<
class
Policy
,
class
SrcPtr
,
typename
DstType
,
class
UnOp
,
class
MaskPtr
>
__host__
void
transform
(
const
SrcPtr
&
src
,
const
GlobPtr
<
DstType
>&
dst
,
const
UnOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
__host__
void
transform
_unary
(
const
SrcPtr
&
src
,
const
GlobPtr
<
DstType
>&
dst
,
const
UnOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
{
TransformDispatcher
<
false
,
Policy
>::
call
(
src
,
dst
,
op
,
mask
,
rows
,
cols
,
stream
);
}
template
<
class
Policy
,
class
SrcPtr1
,
class
SrcPtr2
,
typename
DstType
,
class
BinOp
,
class
MaskPtr
>
__host__
void
transform
(
const
SrcPtr1
&
src1
,
const
SrcPtr2
&
src2
,
const
GlobPtr
<
DstType
>&
dst
,
const
BinOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
__host__
void
transform
_binary
(
const
SrcPtr1
&
src1
,
const
SrcPtr2
&
src2
,
const
GlobPtr
<
DstType
>&
dst
,
const
BinOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
{
TransformDispatcher
<
false
,
Policy
>::
call
(
src1
,
src2
,
dst
,
op
,
mask
,
rows
,
cols
,
stream
);
}
template
<
class
Policy
,
typename
SrcType
,
typename
DstType
,
class
UnOp
,
class
MaskPtr
>
__host__
void
transform
(
const
GlobPtr
<
SrcType
>&
src
,
const
GlobPtr
<
DstType
>&
dst
,
const
UnOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
__host__
void
transform
_unary
(
const
GlobPtr
<
SrcType
>&
src
,
const
GlobPtr
<
DstType
>&
dst
,
const
UnOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
{
TransformDispatcher
<
VecTraits
<
SrcType
>::
cn
==
1
&&
VecTraits
<
DstType
>::
cn
==
1
&&
Policy
::
shift
!=
1
,
Policy
>::
call
(
src
,
dst
,
op
,
mask
,
rows
,
cols
,
stream
);
}
template
<
class
Policy
,
typename
SrcType1
,
typename
SrcType2
,
typename
DstType
,
class
BinOp
,
class
MaskPtr
>
__host__
void
transform
(
const
GlobPtr
<
SrcType1
>&
src1
,
const
GlobPtr
<
SrcType2
>&
src2
,
const
GlobPtr
<
DstType
>&
dst
,
const
BinOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
__host__
void
transform
_binary
(
const
GlobPtr
<
SrcType1
>&
src1
,
const
GlobPtr
<
SrcType2
>&
src2
,
const
GlobPtr
<
DstType
>&
dst
,
const
BinOp
&
op
,
const
MaskPtr
&
mask
,
int
rows
,
int
cols
,
cudaStream_t
stream
)
{
TransformDispatcher
<
VecTraits
<
SrcType1
>::
cn
==
1
&&
VecTraits
<
SrcType2
>::
cn
==
1
&&
VecTraits
<
DstType
>::
cn
==
1
&&
Policy
::
shift
!=
1
,
Policy
>::
call
(
src1
,
src2
,
dst
,
op
,
mask
,
rows
,
cols
,
stream
);
}
...
...
modules/cudev/include/opencv2/cudev/grid/transform.hpp
View file @
32d578f5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment