For a possible minor speed up you could do:

    {
        float * target_ptr = ecl_kw_get_ptr( *this );
        for (int i=0; i < num; i++)
             target_ptr[i] = data[ i * stride + offset];
    }