! \brief Class interface for cl_event. * * \note Copies of these objects are shallow, meaning that the copy will refer * to the same underlying cl_event as the original. For details, see * clRetainEvent() and clReleaseEvent(). * * \see cl_event */
| 2840 | * \see cl_event |
| 2841 | */ |
| 2842 | class Event : public detail::Wrapper<cl_event> |
| 2843 | { |
| 2844 | public: |
| 2845 | //! \brief Default constructor - initializes to NULL. |
| 2846 | Event() : detail::Wrapper<cl_type>() { } |
| 2847 | |
| 2848 | /*! \brief Constructor from cl_event - takes ownership. |
| 2849 | * |
| 2850 | * This effectively transfers ownership of a refcount on the cl_event |
| 2851 | * into the new Event object. |
| 2852 | */ |
| 2853 | __CL_EXPLICIT_CONSTRUCTORS Event(const cl_event& event) : detail::Wrapper<cl_type>(event) { } |
| 2854 | |
| 2855 | /*! \brief Assignment operator from cl_event - takes ownership. |
| 2856 | * |
| 2857 | * This effectively transfers ownership of a refcount on the rhs and calls |
| 2858 | * clReleaseEvent() on the value previously held by this instance. |
| 2859 | */ |
| 2860 | Event& operator = (const cl_event& rhs) |
| 2861 | { |
| 2862 | detail::Wrapper<cl_type>::operator=(rhs); |
| 2863 | return *this; |
| 2864 | } |
| 2865 | |
| 2866 | //! \brief Wrapper for clGetEventInfo(). |
| 2867 | template <typename T> |
| 2868 | cl_int getInfo(cl_event_info name, T* param) const |
| 2869 | { |
| 2870 | return detail::errHandler( |
| 2871 | detail::getInfo(&::clGetEventInfo, object_, name, param), |
| 2872 | __GET_EVENT_INFO_ERR); |
| 2873 | } |
| 2874 | |
| 2875 | //! \brief Wrapper for clGetEventInfo() that returns by value. |
| 2876 | template <cl_int name> typename |
| 2877 | detail::param_traits<detail::cl_event_info, name>::param_type |
| 2878 | getInfo(cl_int* err = NULL) const |
| 2879 | { |
| 2880 | typename detail::param_traits< |
| 2881 | detail::cl_event_info, name>::param_type param; |
| 2882 | cl_int result = getInfo(name, ¶m); |
| 2883 | if (err != NULL) { |
| 2884 | *err = result; |
| 2885 | } |
| 2886 | return param; |
| 2887 | } |
| 2888 | |
| 2889 | //! \brief Wrapper for clGetEventProfilingInfo(). |
| 2890 | template <typename T> |
| 2891 | cl_int getProfilingInfo(cl_profiling_info name, T* param) const |
| 2892 | { |
| 2893 | return detail::errHandler(detail::getInfo( |
| 2894 | &::clGetEventProfilingInfo, object_, name, param), |
| 2895 | __GET_EVENT_PROFILE_INFO_ERR); |
| 2896 | } |
| 2897 | |
| 2898 | //! \brief Wrapper for clGetEventProfilingInfo() that returns by value. |
| 2899 | template <cl_int name> typename |
nothing calls this directly
no outgoing calls
no test coverage detected