1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

use host data when DEVICE_MEM_UHP is set (the risk of vary align size is owned by users)

This commit is contained in:
yao
2013-04-13 14:58:49 +08:00
parent 3b364330ad
commit 40d0e0eda0
4 changed files with 31 additions and 47 deletions
+4 -2
View File
@@ -263,8 +263,10 @@ namespace cv
void create(Size size, int type);
//! allocates new oclMatrix with specified device memory type.
void createEx(int rows, int cols, int type, DevMemRW rw_type, DevMemType mem_type);
void createEx(Size size, int type, DevMemRW rw_type, DevMemType mem_type);
void createEx(int rows, int cols, int type,
DevMemRW rw_type, DevMemType mem_type, void* hptr = 0);
void createEx(Size size, int type, DevMemRW rw_type,
DevMemType mem_type, void* hptr = 0);
//! decreases reference counter;
// deallocate the data when reference counter reaches 0.
@@ -68,7 +68,8 @@ namespace cv
void CV_EXPORTS 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,
size_t widthInBytes, size_t height, DevMemRW rw_type, DevMemType mem_type);
size_t widthInBytes, size_t height,
DevMemRW rw_type, DevMemType mem_type, void* hptr = 0);
void CV_EXPORTS 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);