-
Notifications
You must be signed in to change notification settings - Fork 549
Request for batch support for histEq #2887
Description
hello all,
I am trying to use the af::histequal function inside gfor, and am having trouble understanding how to input the desired histogram.
I am trying something like this:
gfor(seq i, n)
{
unwrapped(af::span, i) = af::histEqual(unwrapped(af::span, i), ahist(af::span, i));
}where unwrapped is a representation of an image with sliding windows as columns and ahist is an array with the histogram of each window as a column.
The problem I am running into is that af::histEqual checks ahist.dims().ndims() == 1. This code works fine outside gfor(), but inside gfor ahist.dims() is [256, 1, 1, number of windows], and so ndims() = 4 which triggers the assertion.
I have also tried computing the histogram for each window inside the gfor() section, but the same error occurs with the dimensions of that array. The hist() function works fine inside gfor() though.
Is there a better way to auto-vectorize this operation?