Skip to content

Conversation

@anshuman23
Copy link
Owner

@josevalim, I have wrapped the references around appropriate structs as you had instructed. Is this fine?

Once you give the go-ahead, I'll make more changes and start removing C code that can easily be replicated in Elixir.


def load_nifs do
:erlang.load_nif("priv/Tensorflex", 0)
import Tensorflex.NIFs
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to import them before using. import in Elixir is to invoke functions without the module name.

However, you could use aliases to avoid typing the Tensorflex. prefix everytime.

alias Tensorflex.{NIFs, Graph, Matrix, Tensor}

Now you can write NIFs.read_graph(filepath) instead of Tensorflex.NIFs.read_graph(filepath)

Copy link
Owner Author

Choose a reason for hiding this comment

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

I understand. Thank you for the input.

I've added this and I'm merging the latest code.

@josevalim
Copy link
Contributor

I have added one comment, everything else is great!

@anshuman23 anshuman23 merged commit 03e2a3c into master Jul 13, 2018
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.

3 participants