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
3b0823db
Commit
3b0823db
authored
Oct 11, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocl: fix CV_EXPORTS usage (misplaced in functions declarations)
parent
ce117715
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
26 deletions
+28
-26
ocl.hpp
modules/ocl/include/opencv2/ocl/ocl.hpp
+5
-3
util.hpp
modules/ocl/include/opencv2/ocl/private/util.hpp
+23
-23
No files found.
modules/ocl/include/opencv2/ocl/ocl.hpp
View file @
3b0823db
...
...
@@ -187,9 +187,9 @@ namespace cv
return
Context
::
getContext
()
->
getOpenCLCommandQueuePtr
();
}
bool
CV_EXPORTS
supportsFeature
(
FEATURE_TYPE
featureType
);
CV_EXPORTS
bool
supportsFeature
(
FEATURE_TYPE
featureType
);
void
CV_EXPORTS
finish
();
CV_EXPORTS
void
finish
();
enum
BINARY_CACHE_MODE
{
...
...
@@ -1739,7 +1739,7 @@ namespace cv
// output -
// keys = {1, 2, 3} (CV_8UC1)
// values = {6,2, 10,5, 4,3} (CV_8UC2)
void
CV_EXPORTS
sortByKey
(
oclMat
&
keys
,
oclMat
&
values
,
int
method
,
bool
isGreaterThan
=
false
);
CV_EXPORTS
void
sortByKey
(
oclMat
&
keys
,
oclMat
&
values
,
int
method
,
bool
isGreaterThan
=
false
);
/*!Base class for MOG and MOG2!*/
class
CV_EXPORTS
BackgroundSubtractor
{
...
...
@@ -1938,6 +1938,7 @@ namespace cv
private
:
oclMat
samples_ocl
;
};
/*!*************** SVM *************!*/
class
CV_EXPORTS
CvSVM_OCL
:
public
CvSVM
{
...
...
@@ -1957,6 +1958,7 @@ namespace cv
void
create_kernel
();
void
create_solver
();
};
/*!*************** END *************!*/
}
}
...
...
modules/ocl/include/opencv2/ocl/private/util.hpp
View file @
3b0823db
...
...
@@ -86,39 +86,39 @@ enum openCLMemcpyKind
clMemcpyDeviceToDevice
};
///////////////////////////OpenCL call wrappers////////////////////////////
void
CV_EXPORTS
openCLMallocPitch
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
CV_EXPORTS
void
openCLMallocPitch
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
size_t
widthInBytes
,
size_t
height
);
void
CV_EXPORTS
openCLMallocPitchEx
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
CV_EXPORTS
void
openCLMallocPitchEx
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
size_t
widthInBytes
,
size_t
height
,
DevMemRW
rw_type
,
DevMemType
mem_type
);
void
CV_EXPORTS
openCLMemcpy2D
(
Context
*
clCxt
,
void
*
dst
,
size_t
dpitch
,
CV_EXPORTS
void
openCLMemcpy2D
(
Context
*
clCxt
,
void
*
dst
,
size_t
dpitch
,
const
void
*
src
,
size_t
spitch
,
size_t
width
,
size_t
height
,
openCLMemcpyKind
kind
,
int
channels
=
-
1
);
void
CV_EXPORTS
openCLCopyBuffer2D
(
Context
*
clCxt
,
void
*
dst
,
size_t
dpitch
,
int
dst_offset
,
CV_EXPORTS
void
openCLCopyBuffer2D
(
Context
*
clCxt
,
void
*
dst
,
size_t
dpitch
,
int
dst_offset
,
const
void
*
src
,
size_t
spitch
,
size_t
width
,
size_t
height
,
int
src_offset
);
void
CV_EXPORTS
openCLFree
(
void
*
devPtr
);
cl_mem
CV_EXPORTS
openCLCreateBuffer
(
Context
*
clCxt
,
size_t
flag
,
size_t
size
);
void
CV_EXPORTS
openCLReadBuffer
(
Context
*
clCxt
,
cl_mem
dst_buffer
,
void
*
host_buffer
,
size_t
size
);
cl_kernel
CV_EXPORTS
openCLGetKernelFromSource
(
const
Context
*
clCxt
,
CV_EXPORTS
void
openCLFree
(
void
*
devPtr
);
CV_EXPORTS
cl_mem
openCLCreateBuffer
(
Context
*
clCxt
,
size_t
flag
,
size_t
size
);
CV_EXPORTS
void
openCLReadBuffer
(
Context
*
clCxt
,
cl_mem
dst_buffer
,
void
*
host_buffer
,
size_t
size
);
CV_EXPORTS
cl_kernel
openCLGetKernelFromSource
(
const
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
);
cl_kernel
CV_EXPORTS
openCLGetKernelFromSource
(
const
Context
*
clCxt
,
CV_EXPORTS
cl_kernel
openCLGetKernelFromSource
(
const
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
const
char
*
build_options
);
void
CV_EXPORTS
openCLVerifyKernel
(
const
Context
*
clCxt
,
cl_kernel
kernel
,
size_t
*
localThreads
);
void
CV_EXPORTS
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
CV_EXPORTS
void
openCLVerifyKernel
(
const
Context
*
clCxt
,
cl_kernel
kernel
,
size_t
*
localThreads
);
CV_EXPORTS
void
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
globalcols
,
int
globalrows
,
size_t
blockSize
=
16
,
int
kernel_expand_depth
=
-
1
,
int
kernel_expand_channel
=
-
1
);
void
CV_EXPORTS
openCLExecuteKernel_
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
CV_EXPORTS
void
openCLExecuteKernel_
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
,
const
char
*
build_options
);
void
CV_EXPORTS
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
CV_EXPORTS
void
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
);
void
CV_EXPORTS
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
CV_EXPORTS
void
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
,
const
char
*
build_options
);
cl_mem
CV_EXPORTS
load_constant
(
cl_context
context
,
cl_command_queue
command_queue
,
const
void
*
value
,
CV_EXPORTS
cl_mem
load_constant
(
cl_context
context
,
cl_command_queue
command_queue
,
const
void
*
value
,
const
size_t
size
);
cl_mem
CV_EXPORTS
openCLMalloc
(
cl_context
clCxt
,
size_t
size
,
cl_mem_flags
flags
,
void
*
host_ptr
);
CV_EXPORTS
cl_mem
openCLMalloc
(
cl_context
clCxt
,
size_t
size
,
cl_mem_flags
flags
,
void
*
host_ptr
);
enum
FLUSH_MODE
{
...
...
@@ -127,9 +127,9 @@ enum FLUSH_MODE
DISABLE
};
void
CV_EXPORTS
openCLExecuteKernel2
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
CV_EXPORTS
void
openCLExecuteKernel2
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
,
FLUSH_MODE
finish_mode
=
DISABLE
);
void
CV_EXPORTS
openCLExecuteKernel2
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
CV_EXPORTS
void
openCLExecuteKernel2
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
,
char
*
build_options
,
FLUSH_MODE
finish_mode
=
DISABLE
);
...
...
@@ -137,8 +137,8 @@ void CV_EXPORTS openCLExecuteKernel2(Context *clCxt, const cv::ocl::ProgramEntry
// note:
// 1. there is no memory management. User need to explicitly release the resource
// 2. for faster clamping, there is no buffer padding for the constructed texture
cl_mem
CV_EXPORTS
bindTexture
(
const
oclMat
&
mat
);
void
CV_EXPORTS
releaseTexture
(
cl_mem
&
texture
);
CV_EXPORTS
cl_mem
bindTexture
(
const
oclMat
&
mat
);
CV_EXPORTS
void
releaseTexture
(
cl_mem
&
texture
);
//Represents an image texture object
class
CV_EXPORTS
TextureCL
...
...
@@ -165,11 +165,11 @@ private:
// bind oclMat to OpenCL image textures and retunrs an TextureCL object
// note:
// for faster clamping, there is no buffer padding for the constructed texture
Ptr
<
TextureCL
>
CV_EXPORTS
bindTexturePtr
(
const
oclMat
&
mat
);
CV_EXPORTS
Ptr
<
TextureCL
>
bindTexturePtr
(
const
oclMat
&
mat
);
bool
CV_EXPORTS
isCpuDevice
();
CV_EXPORTS
bool
isCpuDevice
();
size_t
CV_EXPORTS
queryWaveFrontSize
(
cl_kernel
kernel
);
CV_EXPORTS
size_t
queryWaveFrontSize
(
cl_kernel
kernel
);
inline
size_t
divUp
(
size_t
total
,
size_t
grain
)
...
...
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