Skip to content
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

Refactor lib/exla/nif.ex #19

Merged
merged 1 commit into from
Nov 14, 2020
Merged

Refactor lib/exla/nif.ex #19

merged 1 commit into from
Nov 14, 2020

Conversation

wojtekmach
Copy link
Contributor

No description provided.

Copy link
Collaborator

@seanmor5 seanmor5 left a comment

Choose a reason for hiding this comment

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

Much cleaner!

@seanmor5 seanmor5 merged commit 1c74d12 into elixir-nx:main Nov 14, 2020
@@ -8,178 +8,188 @@ defmodule Exla.NIF do
:erlang.load_nif(path, 0)
end

defmacrop nif_error() do
quote do
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about having it call nif_error(ENV.function) which then builds the error message? That’s so we don’t build the same string over and over again.

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.

None yet

3 participants