pavanky · GitHub

Code to reproduce:

#include <arrayfire.h>
#include <af/macros.h>
#include <cstdio>
#include <cstdlib>
using namespace af;
int main(int argc, char *argv[])
{
    try {
        AF_MEM_INFO("At the beginning");
        for (int i = 0; i < 10; i++)
        {
            do
            {
                af::array ptemp(100, 100, f32);
                float val = af::median<float>(ptemp);
            } while (0);
            AF_MEM_INFO("At the end of loop");
        }
    } catch (af::exception& e) {
        fprintf(stderr, "%s\n", e.what());
        throw;
    }
    return 0;
}

Reported here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/arrayfire-users/zUBQQ1kUVT4/bcIWvZXEGQAJ

Read the original on github.com ↗