summaryrefslogtreecommitdiff
path: root/utests/compiler_abs_diff.cpp
Commit message (Collapse)AuthorAgeFilesLines
* utest: do not check the padding componenet for 3-component vector data typesGuo Yejun2016-08-031-1/+16
| | | | | | | | | | | Per OPenCL 1.2 spec 6.1.5: For 3-component vector data types, the size of the data type is 4 * sizeof(component). The spec does not explicitly say what the padding componenet will be, it should be implementation-dependent, so, do not check the padding componenet in the unit test. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
* Accelerate utest.Zhigang Gong2013-12-161-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For some test cases which include more than one kernel, the current implementation always build the program for a new sub test case. That wastes a lot of time. This patch introduce a new macro MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM which has an extra parameter to specify whether to keep the previous program and avoid the extra build. The normal usage is: MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM(fn1, true); MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM(fn2, true); MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM(fn3, true); MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM(fn4, true); MAKE_UTEST_FROM_FUNCTION_KEEP_PROGRAM(fn5, false); The scenario is that the above fn1-5 are included in the same kernel file and we define the sub cases in the same cpp file. We already have some examples of this usage in the compiler_abs.cpp, compiler_abs_diff.cpp compiler_basic_arithmetic.cpp, compiler_vector_load_store.cpp, etc. This patch reduces 2/3 of the utests execution time. v2: should always destroy the program when run one specific test case. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
* rename ulong to ulong64 to avoid the conflicts in <sys/types.h>Lu Guanqun2013-08-211-3/+3
| | | | | | | | | [ 31%] Building CXX object utests/CMakeFiles/utests.dir/compiler_abs_diff.cpp.o /home/q/beignet.git/utests/compiler_abs_diff.cpp:201:18: error: conflicting declaration ‘typedef uint64_t ulong’ /usr/include/i386-linux-gnu/sys/types.h:151:27: error: ‘ulong’ has a previous declaration as ‘typedef long unsigned int ulong’ Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Utests: enable long/ulong for abs_diff test case.Zhigang Gong2013-08-191-5/+30
| | | | Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Add the test case for builtin abs_diff() functionJunyan He2013-07-031-0/+267
All the integer value types check are supported. Please use the case named compiler_abs_diff_xxxx, where xxxx means the data type such as int2, char4 Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>