Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,11 +4,10 @@ LIBTENSORFLOW_PATH = /usr/local/lib
CFLAGS += -I$(ERLANG_PATH)
CFLAGS += -Ic_src
LDFLAGS += -L$(LIBTENSORFLOW_PATH)
LIB_SO_NAME = priv/TensorflEx.so
LIB_SO_NAME = priv/Tensorflex.so
CFLAGS += -fPIC
NIF=c_src/TensorflEx.c
NIF=c_src/Tensorflex.c

$(LIB_SO_NAME): $(NIF)
mkdir -p priv
$(CC) $(CFLAGS) -shared $(LDFLAGS) $^ -ltensorflow -o $@

2 changes: 1 addition & 1 deletion c_src/TensorflEx.c → c_src/Tensorflex.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -115,5 +115,5 @@ static ErlNifFunc nif_funcs[] =
{ "create_and_run_sess", 3, create_and_run_sess }
};

ERL_NIF_INIT(Elixir.TensorflEx, nif_funcs, res_loader, NULL, NULL, NULL)
ERL_NIF_INIT(Elixir.Tensorflex, nif_funcs, res_loader, NULL, NULL, NULL)

4 changes: 2 additions & 2 deletions lib/tensorflex.ex
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
defmodule TensorflEx do
defmodule Tensorflex do
@on_load :load_nifs

def load_nifs do
:erlang.load_nif("priv/TensorflEx", 0)
:erlang.load_nif("priv/Tensorflex", 0)
end

def version do
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
defmodule TensorflEx.MixProject do
defmodule Tensorflex.MixProject do
use Mix.Project

def project do
Expand Down