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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |

--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
New reduced testcase:
```
static void addPrior(float center_x, float center_y, float width, float height,
                     bool normalized, float *dst) {
  if (normalized) {
    dst[0] = (center_x - width * 0.5f);
    dst[1] = (center_y - height * 0.5f);
    dst[2] = (center_x + width * 0.5f);
    dst[3] = (center_y + height * 0.5f);
  } else {
    dst[0] = center_x - width * 0.5f;
    dst[1] = center_y - height * 0.5f;
    dst[2] = center_x + width * 0.5f - 1.0f;
    dst[3] = center_y + height * 0.5f - 1.0f;
  }
}
void forward(float *outputPtr, int _offsetsXs, float *_offsetsX,
             float *_offsetsY, float _stepX, float _stepY,
             bool _bboxesNormalized, float _boxWidth, float _boxHeight) {
  for (int j = 0; j < _offsetsXs; ++j) {
    float center_x = (_offsetsX[j]) * _stepX;
    float center_y = (_offsetsY[j]) * _stepY;
    addPrior(center_x, center_y, _boxWidth, _boxHeight, _bboxesNormalized,
             outputPtr);
    outputPtr += 4;
  }
}
```

This is almost the same as the original source even, I even added back part of
addPrior just in case though I split the increment of the outputPtr from
addPrior into the forward function.

Reply via email to