创建后,用户事件引用计数设置为2

时间:2015-09-14 15:13:06

标签: opencl

如果我在创建后立即检查我的cl用户事件的引用计数,则得到值2.这对我来说似乎是一个错误:我期望值为1.

创建电话是:

cl_int errorCode;
cl_event evt = clCreateUserEvent(context, &errorCode);

1 个答案:

答案 0 :(得分:2)

An OpenCL object's reference count may also includes any internal references that the implementation holds to that object. As a developer, you have absolutely no guarantees about what the reference count for any object should be, at any time. The specification says:

The reference count returned should be considered immediately stale. It is unsuitable for general use in applications.