Skip to content

Let af_approx1 allocate the output array, have af_approx1_v2 accept preallocated outputs #2599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 27, 2019

Conversation

mark-poscablo
Copy link
Contributor

This extends #2324 in order to address the concern raised in #2481 (comment). Here, af_approx1's behavior towards allocating output arrays is reverted to the original (before #2324), where it simply creates a new af_array each time. However, a new function is added: af_approx1_v2, which implements the same behavior as in #2324 (uses the existing array passed as the out argument and only allocate if it is null).

Here are some screenshots of the added documentation as well:
image
image

Copy link
Member

@umar456 umar456 left a comment

Choose a reason for hiding this comment

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

Looks good. I have requested a couple of changes. Can you also run clang-format on this?

@mark-poscablo
Copy link
Contributor Author

Looks good. I have requested a couple of changes. Can you also run clang-format on this?

I ran clang-format on the modified files but left out the specially formatted lines already there, which I assume were written that way to make them easier to read.

Copy link
Member

@umar456 umar456 left a comment

Choose a reason for hiding this comment

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

One minor change to the docs.

@umar456 umar456 merged commit 2fea8ac into arrayfire:master Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants