shehzan10 · GitHub

@shehzan10

Copy link Copy Markdown

Member

Fixes #1597

[skip arrayfire ci]

The function definition and all calls to the getInfo functions are
correct.

umar456

}

template<typename T>
static inline void sparseEval(af_array arr)

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better(simpler) approach would be to specialize eval to accept sparse arrays

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template<typename T, bool sparse = false>
static inline void eval(af_array arr)
{
    if(sparse) {
        getSparse<T>(arr).eval();
    } else {
        getArray<T>(arr).eval();
    }
    return;
}

umar456

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor revision. Looks good otherwise

@shehzan10

Closed

@shehzan10

Merged

Read the original on github.com ↗