Beispiel #1
0
 explicit image_sampler(cl_sampler sampler, bool retain = true)
     : m_sampler(sampler)
 {
     if(m_sampler && retain){
         clRetainSampler(m_sampler);
     }
 }
Beispiel #2
0
 image_sampler(const image_sampler &other)
     : m_sampler(other.m_sampler)
 {
     if(m_sampler){
         clRetainSampler(m_sampler);
     }
 }
Beispiel #3
0
cl_int WINAPI wine_clRetainSampler(cl_sampler sampler)
{
    cl_int ret;
    TRACE("\n");
    ret = clRetainSampler(sampler);
    return ret;
}
Beispiel #4
0
    image_sampler& operator=(const image_sampler &other)
    {
        if(this != &other){
            if(m_sampler){
                clReleaseSampler(m_sampler);
            }

            m_sampler = other.m_sampler;

            if(m_sampler){
                clRetainSampler(m_sampler);
            }
        }

        return *this;
    }