summaryrefslogtreecommitdiff
path: root/utests/runtime_cmrt.cpp
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2016-08-19 08:57:04 +0800
committerYang Rong <rong.r.yang@intel.com>2016-08-31 16:39:40 +0800
commit7fefbd545fe454a5ed824efebd98372b310fdf8a (patch)
tree41aaea09cf454b9c762932a00b0f7f0e940a1cd5 /utests/runtime_cmrt.cpp
parentf522e994aa62372259318424db6b5715de1828b6 (diff)
downloadbeignet-7fefbd545fe454a5ed824efebd98372b310fdf8a.tar.gz
use OCL_MAP_BUFFER_GTT to map climage
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/runtime_cmrt.cpp')
-rw-r--r--utests/runtime_cmrt.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/utests/runtime_cmrt.cpp b/utests/runtime_cmrt.cpp
index 837f09a7..92bd368f 100644
--- a/utests/runtime_cmrt.cpp
+++ b/utests/runtime_cmrt.cpp
@@ -236,8 +236,8 @@ void runtime_cmrt(void)
OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL);
OCL_CREATE_IMAGE(buf[1], 0, &format, &desc, NULL);
- OCL_MAP_BUFFER(0);
- OCL_MAP_BUFFER(1);
+ OCL_MAP_BUFFER_GTT(0);
+ OCL_MAP_BUFFER_GTT(1);
uint8_t* src = (uint8_t*)buf_data[0];
uint8_t* dst = (uint8_t*)buf_data[1];
for (uint32_t j = 0; j < h; ++j)
@@ -245,8 +245,8 @@ void runtime_cmrt(void)
src[j * w * 4 + i] = i;
dst[j * w * 4 + i] = 0;
}
- OCL_UNMAP_BUFFER(0);
- OCL_UNMAP_BUFFER(1);
+ OCL_UNMAP_BUFFER_GTT(0);
+ OCL_UNMAP_BUFFER_GTT(1);
unsigned int d = 3;
OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
@@ -259,16 +259,16 @@ void runtime_cmrt(void)
//if kernel uses cm_linear_global_id, locals must be not NULL to invoke pCmQueue->EnqueueWithGroup
OCL_CALL (clEnqueueNDRangeKernel, queue, kernel, 2, NULL, globals, NULL, 0, NULL, NULL);
- OCL_MAP_BUFFER(0);
- OCL_MAP_BUFFER(1);
+ OCL_MAP_BUFFER_GTT(0);
+ OCL_MAP_BUFFER_GTT(1);
src = (uint8_t*)buf_data[0];
dst = (uint8_t*)buf_data[1];
for (uint32_t j = 0; j < h; ++j)
for (uint32_t i = 0; i < w*4; i++) {
OCL_ASSERT(src[j * w * 4 + i] / d == dst[j * w * 4 + i]);
}
- OCL_UNMAP_BUFFER(0);
- OCL_UNMAP_BUFFER(1);
+ OCL_UNMAP_BUFFER_GTT(0);
+ OCL_UNMAP_BUFFER_GTT(1);
}
MAKE_UTEST_FROM_FUNCTION(runtime_cmrt);