oneapi-src / oneAPI-samples

Samples for Intel® oneAPI Toolkits
https://oneapi-src.github.io/oneAPI-samples/
MIT License
949 stars 693 forks source link

Bug fix, infinite recursion. Mandel.hpp #2262

Closed BrianOBrien closed 7 months ago

BrianOBrien commented 7 months ago

@bjodom @MoushumiMaria @pmpeter1 @yuguen-intel Can you please review this change (DPC++)

Description A new routine had been created to handle double precision numbers. Mandelbrot::CalculateDP

The Method Mandelbrot::Calculate did not call this new method, for some reason, it seems it called itself and recursed into a stack overflow.

void Mandelbrot::Calculate(uint32_t* pixels) {
    if (singlePrecision)
        CalculateSP(pixels);
    else
        Calculate(pixels);  //<--- Should be CalculateDP(pixels);
}

Fixes Issue# ISSUE 2263

External Dependencies

None

Type of change

How Has This Been Tested?

Term coverage analysis was done for the lines changed.

yuguen-intel commented 7 months ago

All PRs should be made to the development branch @jimmytwei

jimmytwei commented 7 months ago

@BrianOBrien Good catch. I've updated this in the development branch. We'll merge this change in the master branch in the release.