https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91198

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
void compress(float const * __restrict__ input, 
              float       * __restrict__ output, 
              int size)
{
    float const threshold = 0.5; 
    int o = 0;
    for (int i = 0; i < size; ++i) 
    {
        if (input[i] < threshold) 
        {
            output[o] = input[i];
            o++;
        } 
    }
}

void expand(float const * __restrict__ input, 
            float       * __restrict__ output, 
            int size)
{
    float const threshold = 0.5; 
    int o = 0;
    for (int i = 0; i < size; ++i) 
    {
        if (input[i] < threshold) 
        {
            output[i] = input[o];
            o++;
        } 
    }
}

Reply via email to