! \brief C++ base class for Image Memory objects. * * See Memory for details about copy semantics, etc. * * \see Memory */
| 3552 | * \see Memory |
| 3553 | */ |
| 3554 | class Image : public Memory |
| 3555 | { |
| 3556 | protected: |
| 3557 | //! \brief Default constructor - initializes to NULL. |
| 3558 | Image() : Memory() { } |
| 3559 | |
| 3560 | /*! \brief Constructor from cl_mem - takes ownership. |
| 3561 | * |
| 3562 | * See Memory for further details. |
| 3563 | */ |
| 3564 | __CL_EXPLICIT_CONSTRUCTORS Image(const cl_mem& image) : Memory(image) { } |
| 3565 | |
| 3566 | /*! \brief Assignment from cl_mem - performs shallow copy. |
| 3567 | * |
| 3568 | * See Memory for further details. |
| 3569 | */ |
| 3570 | Image& operator = (const cl_mem& rhs) |
| 3571 | { |
| 3572 | Memory::operator=(rhs); |
| 3573 | return *this; |
| 3574 | } |
| 3575 | |
| 3576 | /*! \brief Copy constructor to forward copy to the superclass correctly. |
| 3577 | * Required for MSVC. |
| 3578 | */ |
| 3579 | Image(const Image& img) : Memory(img) {} |
| 3580 | |
| 3581 | /*! \brief Copy assignment to forward copy to the superclass correctly. |
| 3582 | * Required for MSVC. |
| 3583 | */ |
| 3584 | Image& operator = (const Image &img) |
| 3585 | { |
| 3586 | Memory::operator=(img); |
| 3587 | return *this; |
| 3588 | } |
| 3589 | |
| 3590 | #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) |
| 3591 | /*! \brief Move constructor to forward move to the superclass correctly. |
| 3592 | * Required for MSVC. |
| 3593 | */ |
| 3594 | Image(Image&& img) CL_HPP_NOEXCEPT : Memory(std::move(img)) {} |
| 3595 | |
| 3596 | /*! \brief Move assignment to forward move to the superclass correctly. |
| 3597 | * Required for MSVC. |
| 3598 | */ |
| 3599 | Image& operator = (Image &&img) |
| 3600 | { |
| 3601 | Memory::operator=(std::move(img)); |
| 3602 | return *this; |
| 3603 | } |
| 3604 | #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) |
| 3605 | |
| 3606 | public: |
| 3607 | //! \brief Wrapper for clGetImageInfo(). |
| 3608 | template <typename T> |
| 3609 | cl_int getImageInfo(cl_image_info name, T* param) const |
| 3610 | { |
| 3611 | return detail::errHandler( |
no outgoing calls
no test coverage detected