diff options
author | Adam Lerer <alerer@fb.com> | 2015-05-12 06:36:23 +0300 |
---|---|---|
committer | Adam Lerer <alerer@fb.com> | 2015-05-13 06:31:39 +0300 |
commit | a462b3ede354a50a301a770d9c4b8476440fe1fc (patch) | |
tree | 2985502df6d18519d92d2d04de574db49e26d4cc /Storage.c | |
parent | 43657af32f9c7b1df2ff33335e3ffffbf6320cf7 (diff) |
Revert "Auto device: API changes, bug fixes, README.md"
This reverts commit d88ac24c712e3a40d4aaf3ac2d043bd79ba4280e.
Revert "Auto device mode, plus allocation helper functions."
This reverts commit 47a2f6de252c2254234edfc1c6115229b5383bac.
Diffstat (limited to 'Storage.c')
-rw-r--r-- | Storage.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -105,19 +105,6 @@ CUDA_IMPLEMENT_STORAGE_COPY(Long) CUDA_IMPLEMENT_STORAGE_COPY(Float) CUDA_IMPLEMENT_STORAGE_COPY(Double) -static int cutorch_CudaStorage_getDevice(lua_State *L) { - THCudaStorage *storage = luaT_checkudata(L, 1, "torch.CudaStorage"); - lua_pushinteger(L, THCudaStorage_getDevice(cutorch_getstate(L), storage) + 1); - return 1; -} - -static int cutorch_CudaStorage_setDevice(lua_State *L) { - THCudaStorage *storage = luaT_checkudata(L, 1, "torch.CudaStorage"); - int device = luaL_checkint(L, 2) - 1; - THCudaStorage_setDevice(cutorch_getstate(L), storage, device); - return 0; -} - void cutorch_CudaStorage_init(lua_State* L) { /* the standard stuff */ @@ -153,12 +140,4 @@ void cutorch_CudaStorage_init(lua_State* L) lua_pop(L, 1); } } - - luaT_pushmetatable(L, "torch.CudaStorage"); - lua_pushcfunction(L, cutorch_CudaStorage_getDevice); - lua_setfield(L, -2, "getDevice"); - lua_pushcfunction(L, cutorch_CudaStorage_setDevice); - lua_setfield(L, -2, "setDevice"); - lua_pop(L, 1); - } |