aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-30 16:10:31 +0800
committerDeterminant <[email protected]>2015-05-30 16:10:31 +0800
commitf10330fd95aa87cf6b21d292cf54c77bacfd2e40 (patch)
treee3f47ec47aa24244e9cfb7f7569f0e68145616db
parent1c4a84ff6fabaa78e4c1ed2263d57bd2c79c48a5 (diff)
parent380ffd97f3956c31cd6799b2e3a10d759448c328 (diff)
Merge branch 'master' of github.com:Determinant/nerv
-rw-r--r--README.md34
-rw-r--r--doc/nerv.md5
-rw-r--r--nerv.c1
3 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..54d0218
--- /dev/null
+++ b/README.md
@@ -0,0 +1,34 @@
+#The Nerv Toolkit User Manual#
+This user manual will information about how to use __Nerv__ and __Nerv__'s interface.
+
+##How to use##
+First make sure you have __lua__ and __CUDA__ installed on your computer.
+__Nerv__ is currently developed via github.You can download and make __Nerv__ by doing the following:
+```
+cd ~
+git clone https://github.com/Determinant/nerv.git
+cd nerv
+git submodule init && git submodule update
+make
+```
+The `git submodule` command is for the __luajit__ repository inside __Nerv__.
+Now, you can try to run some example scripts.
+```
+./nerv examples/cumatrix_example.lua
+```
+
+##How to contribute##
+Fork the original repository, then use the __pull&merge__ function in github to contribute.
+The pull&merge request can be found on your dashboard in github. See this [sync-help] to sync with the original repository.
+
+##Nerv Packages##
+* __luaT__
+Nerv uses [luaT]\(a [Torch] library\) to define lua class in C.
+* __[The Nerv utility functions](doc/nerv.md)__
+Inlcudes some utility functions from luaT to implement __Nerv.Class__.
+* __The Nerv Matrix Package__
+The Matrix package is a basic package in __Nerv__ that is used to store and manipulate matrices.
+
+[luaT]:https://github.com/torch/torch7/tree/master/lib/luaT
+[Torch]:https://github.com/torch
+[sync-help]:https://help.github.com/articles/syncing-a-fork/ \ No newline at end of file
diff --git a/doc/nerv.md b/doc/nerv.md
new file mode 100644
index 0000000..85a86ca
--- /dev/null
+++ b/doc/nerv.md
@@ -0,0 +1,5 @@
+#The Nerv utility functions#
+Part of the [Nerv](../README.md) toolkit.
+##Methods##
+* __string = nerv.setmetatable(table self, string tname)__
+A registered function, the original function is `luaT_lua_setmetatable`. It assigns the metatable registered in __luaT__ by the name *tname* to the table *self*. And return *tname* to user.
diff --git a/nerv.c b/nerv.c
index 5693d68..fa47c62 100644
--- a/nerv.c
+++ b/nerv.c
@@ -8,6 +8,7 @@ static const luaL_Reg nerv_utils_methods[] = {
{"setmetatable", luaT_lua_setmetatable},
{"getmetatable", luaT_lua_getmetatable},
{"newmetatable", luaT_lua_newmetatable},
+ {"typename", luaT_lua_typename},
{NULL, NULL}
};