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
9bf2516e
Commit
9bf2516e
authored
Nov 21, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Nov 21, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1841 from ilya-lavrenov:ocl_kernel_compilation
parents
8d1a8df1
65b7e201
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
arithm.cl
modules/core/src/opencl/arithm.cl
+15
-15
copyset.cl
modules/core/src/opencl/copyset.cl
+4
-4
No files found.
modules/core/src/opencl/arithm.cl
View file @
9bf2516e
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
#define CV_32S 4
#define CV_32S 4
#define CV_32F 5
#define CV_32F 5
#define dstelem *(dstT*)(dstptr + dst_index)
#define dstelem *(
__global
dstT*)(dstptr + dst_index)
#define noconvert(x) x
#define noconvert(x) x
#ifndef workT
#ifndef workT
...
@@ -76,14 +76,14 @@
...
@@ -76,14 +76,14 @@
#define srcT1 dstT
#define srcT1 dstT
#define srcT2 dstT
#define srcT2 dstT
#define workT dstT
#define workT dstT
#define srcelem1 *(dstT*)(srcptr1 + src1_index)
#define srcelem1 *(
__global
dstT*)(srcptr1 + src1_index)
#define srcelem2 *(dstT*)(srcptr2 + src2_index)
#define srcelem2 *(
__global
dstT*)(srcptr2 + src2_index)
#define convertToDT noconvert
#define convertToDT noconvert
#else
#else
#define srcelem1 convertToWT1(*(srcT1*)(srcptr1 + src1_index))
#define srcelem1 convertToWT1(*(
__global
srcT1*)(srcptr1 + src1_index))
#define srcelem2 convertToWT2(*(srcT2*)(srcptr2 + src2_index))
#define srcelem2 convertToWT2(*(
__global
srcT2*)(srcptr2 + src2_index))
#endif
#endif
...
@@ -221,9 +221,9 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
...
@@ -221,9 +221,9 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
if (x < cols && y < rows)
if (x < cols && y < rows)
{
{
int src1_index = mad24(y, srcstep1, x*sizeof(srcT1) + srcoffset1);
int src1_index = mad24(y, srcstep1, x*
(int)
sizeof(srcT1) + srcoffset1);
int src2_index = mad24(y, srcstep2, x*sizeof(srcT2) + srcoffset2);
int src2_index = mad24(y, srcstep2, x*
(int)
sizeof(srcT2) + srcoffset2);
int dst_index = mad24(y, dststep, x*sizeof(dstT) + dstoffset);
int dst_index = mad24(y, dststep, x*
(int)
sizeof(dstT) + dstoffset);
PROCESS_ELEM;
PROCESS_ELEM;
//printf("(x=%d, y=%d). %d, %d, %d\n", x, y, (int)srcelem1, (int)srcelem2, (int)dstelem);
//printf("(x=%d, y=%d). %d, %d, %d\n", x, y, (int)srcelem1, (int)srcelem2, (int)dstelem);
...
@@ -246,9 +246,9 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
...
@@ -246,9 +246,9 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
int mask_index = mad24(y, maskstep, x + maskoffset);
int mask_index = mad24(y, maskstep, x + maskoffset);
if( mask[mask_index] )
if( mask[mask_index] )
{
{
int src1_index = mad24(y, srcstep1, x*sizeof(srcT1) + srcoffset1);
int src1_index = mad24(y, srcstep1, x*
(int)
sizeof(srcT1) + srcoffset1);
int src2_index = mad24(y, srcstep2, x*sizeof(srcT2) + srcoffset2);
int src2_index = mad24(y, srcstep2, x*
(int)
sizeof(srcT2) + srcoffset2);
int dst_index = mad24(y, dststep, x*sizeof(dstT) + dstoffset);
int dst_index = mad24(y, dststep, x*
(int)
sizeof(dstT) + dstoffset);
PROCESS_ELEM;
PROCESS_ELEM;
}
}
...
@@ -266,8 +266,8 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
...
@@ -266,8 +266,8 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
if (x < cols && y < rows)
if (x < cols && y < rows)
{
{
int src1_index = mad24(y, srcstep1, x*sizeof(srcT1) + srcoffset1);
int src1_index = mad24(y, srcstep1, x*
(int)
sizeof(srcT1) + srcoffset1);
int dst_index = mad24(y, dststep, x*sizeof(dstT) + dstoffset);
int dst_index = mad24(y, dststep, x*
(int)
sizeof(dstT) + dstoffset);
PROCESS_ELEM;
PROCESS_ELEM;
}
}
...
@@ -288,8 +288,8 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
...
@@ -288,8 +288,8 @@ __kernel void KF(__global const uchar* srcptr1, int srcstep1, int srcoffset1,
int mask_index = mad24(y, maskstep, x + maskoffset);
int mask_index = mad24(y, maskstep, x + maskoffset);
if( mask[mask_index] )
if( mask[mask_index] )
{
{
int src1_index = mad24(y, srcstep1, x*sizeof(srcT1) + srcoffset1);
int src1_index = mad24(y, srcstep1, x*
(int)
sizeof(srcT1) + srcoffset1);
int dst_index = mad24(y, dststep, x*sizeof(dstT) + dstoffset);
int dst_index = mad24(y, dststep, x*
(int)
sizeof(dstT) + dstoffset);
PROCESS_ELEM;
PROCESS_ELEM;
}
}
...
...
modules/core/src/opencl/copyset.cl
View file @
9bf2516e
...
@@ -53,8 +53,8 @@ __kernel void setMask(__global const uchar* mask, int maskstep, int maskoffset,
...
@@ -53,8 +53,8 @@ __kernel void setMask(__global const uchar* mask, int maskstep, int maskoffset,
int
mask_index
=
mad24
(
y,
maskstep,
x
+
maskoffset
)
;
int
mask_index
=
mad24
(
y,
maskstep,
x
+
maskoffset
)
;
if
(
mask[mask_index]
)
if
(
mask[mask_index]
)
{
{
int
dst_index
=
mad24
(
y,
dststep,
x*sizeof
(
dstT
)
+
dstoffset
)
;
int
dst_index
=
mad24
(
y,
dststep,
x*
(
int
)
sizeof
(
dstT
)
+
dstoffset
)
;
*
(
dstT*
)(
dstptr
+
dst_index
)
=
value
;
*
(
__global
dstT*
)(
dstptr
+
dst_index
)
=
value
;
}
}
}
}
}
}
...
@@ -67,7 +67,7 @@ __kernel void set(__global uchar* dstptr, int dststep, int dstoffset,
...
@@ -67,7 +67,7 @@ __kernel void set(__global uchar* dstptr, int dststep, int dstoffset,
if
(
x
<
cols
&&
y
<
rows
)
if
(
x
<
cols
&&
y
<
rows
)
{
{
int
dst_index
=
mad24
(
y,
dststep,
x*sizeof
(
dstT
)
+
dstoffset
)
;
int
dst_index
=
mad24
(
y,
dststep,
x*
(
int
)
sizeof
(
dstT
)
+
dstoffset
)
;
*
(
dstT*
)(
dstptr
+
dst_index
)
=
value
;
*
(
__global
dstT*
)(
dstptr
+
dst_index
)
=
value
;
}
}
}
}
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