#include "TH.h"
#include "THMath.h"
#include "luaT.h"
#include "utils.h"

static const void* torch_istensortype(lua_State *L, const char *tname)
{
  if(!tname)
    return NULL;

  if(!luaT_pushmetatable(L, tname))
    return NULL;

  lua_pushstring(L, "torch");
  lua_rawget(L, -2);
  if(lua_istable(L, -1))
    return tname;
  else
  {
    lua_pop(L, 2);
    return NULL;
  }

  return NULL;
}

static int torch_isnonemptytable(lua_State *L, int idx)
{
  int empty;
  if (!lua_istable(L, idx)) return 0;

  lua_rawgeti(L, idx, 1);
  empty = lua_isnil(L, -1);
  lua_pop(L, 1);
  return !empty;
}

static const void* torch_istensorarray(lua_State *L, int idx)
{
  const char* tname;
  int tensor_idx;
  if (!torch_isnonemptytable(L, idx)) return 0;

  lua_checkstack(L, 3);
  lua_rawgeti(L, idx, 1);
  tensor_idx = lua_gettop(L);
  tname = (torch_istensortype(L, luaT_typename(L, -1)));
  lua_remove(L, tensor_idx);
  return tname;
}

/* WARNING: autogenerated file */

#ifndef _CWRAP_STR_ARG_TYPES_4821726c1947cdf3eebacade98173939
#define _CWRAP_STR_ARG_TYPES_4821726c1947cdf3eebacade98173939
#include "string.h"
static void str_arg_types(lua_State *L, char *buf, int n) {
    int i;
  int nargs = lua_gettop(L);
  if (nargs == 0) {
    snprintf(buf, n, "no arguments provided");
    return;
  }
  for (i = 1; i <= nargs; i++) {
    int l;
    const char *torch_type = luaT_typename(L, i);
    if(torch_type && !strncmp(torch_type, "torch.", 6)) torch_type += 6;
    if (torch_type) l = snprintf(buf, n, "%s ", torch_type);
    else if(lua_isnil(L, i)) l = snprintf(buf, n, "%s ", "nil");
    else if(lua_isboolean(L, i)) l = snprintf(buf, n, "%s ", "boolean");
    else if(lua_isnumber(L, i)) l = snprintf(buf, n, "%s ", "number");
    else if(lua_isstring(L, i)) l = snprintf(buf, n, "%s ", "string");
    else if(lua_istable(L, i)) l = snprintf(buf, n, "%s ", "table");
    else if(lua_isuserdata(L, i)) l = snprintf(buf, n, "%s ", "userdata");
    else l = snprintf(buf, n, "%s ", "???");
    if (l >= n) return;
    buf += l;
    n   -= l;
  }
}
#endif
static int torch_ByteTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_zero(arg1);
return 1;
}

static int torch_zero(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "zero");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.zero() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_fill(arg1,arg2);
return 1;
}

static int torch_fill(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "fill");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.fill() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THByteTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_zeros(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "zeros");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.zeros() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THByteTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_ones(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ones");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ones() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THByteTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_reshape(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "reshape");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.reshape() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THByteTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_gather(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "gather");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.gather() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
unsigned char arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* index LongTensor ByteTensor | *ByteTensor* index LongTensor unsigned char", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THByteTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_scatter(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "scatter");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.scatter() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor ByteTensor", type_buf);
}
arg3 = THByteTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_dot(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "dot");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.dot() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor ByteTensor", type_buf);
}
arg3 = THByteTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_equal(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "equal");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.equal() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
THByteTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 2;
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | [*ByteTensor*] ByteTensor [unsigned char] ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_add(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "add");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.add() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
THByteTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 2;
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | [*ByteTensor*] ByteTensor [unsigned char] ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_csub(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "csub");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.csub() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_mul(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mul");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mul() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_div(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "div");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.div() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_lshift(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "lshift");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.lshift() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_rshift(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "rshift");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.rshift() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_fmod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "fmod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.fmod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_remainder(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "remainder");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.remainder() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_bitand(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bitand");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bitand() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_bitor(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bitor");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bitor() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_bitxor(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bitxor");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bitxor() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_mod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
unsigned char arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char unsigned char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_clamp(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "clamp");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.clamp() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor [unsigned char]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_match(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "match");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.match() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_cmul(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cmul");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cmul() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_cpow(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cpow");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cpow() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_cdiv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cdiv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cdiv() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_clshift(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "clshift");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.clshift() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_crshift(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "crshift");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.crshift() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_cfmod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cfmod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cfmod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_cremainder(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cremainder");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cremainder() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_cbitand(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cbitand");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cbitand() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_cbitor(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cbitor");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cbitor() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_cbitxor(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cbitxor");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cbitxor() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_cmod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cmod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cmod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [unsigned char] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_addcmul(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addcmul");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addcmul() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [unsigned char] ByteTensor ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_addcdiv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addcdiv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addcdiv() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THByteTensor_new();
THByteTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~1D", type_buf);
}
THByteTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_mv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mv() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THByteTensor_new();
THByteTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~2D", type_buf);
}
THByteTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_mm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THByteTensor_new();
THByteTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~3D ByteTensor~3D", type_buf);
}
THByteTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_bmm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bmm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bmm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THByteTensor_new();
THByteTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~1D ByteTensor~1D", type_buf);
}
THByteTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ger(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ger");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ger() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [unsigned char] ByteTensor~1D [unsigned char] ByteTensor~2D ByteTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_addmv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addmv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addmv() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [unsigned char] ByteTensor~2D [unsigned char] ByteTensor~2D ByteTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_addmm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addmm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addmm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [unsigned char] ByteTensor~2D [unsigned char] ByteTensor~1D ByteTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_addr(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addr");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addr() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [unsigned char] ByteTensor~2D [unsigned char] ByteTensor~3D ByteTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_addbmm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "addbmm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.addbmm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (unsigned char)lua_tonumber(L, 1);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [unsigned char] ByteTensor~3D [unsigned char] ByteTensor~3D ByteTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_baddbmm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "baddbmm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.baddbmm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_numel(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "numel");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.numel() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_cumsum(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cumsum");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cumsum() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_cumprod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cumprod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cumprod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
long arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
THByteTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_sum(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sum");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sum() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
long arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
THByteTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_prod(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "prod");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.prod() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THByteTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] [*LongTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THByteTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_min(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "min");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.min() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THByteTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] [*LongTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THByteTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_max(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "max");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.max() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor | [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_cmin(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cmin");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cmin() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor | [*ByteTensor*] ByteTensor unsigned char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_cmax(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cmax");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cmax() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_trace(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "trace");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.trace() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_cross(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cross");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cross() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_diag(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "diag");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.diag() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_eye(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "eye");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.eye() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] long long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_range(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "range");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.range() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THByteTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_randperm(arg1,arg2,arg3);

THByteTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_randperm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "randperm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.randperm() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_sort(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sort");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sort() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THByteTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_topk(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "topk");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.topk() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_kthvalue(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "kthvalue");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.kthvalue() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_mode(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mode");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mode() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_median(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "median");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.median() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_tril(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "tril");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.tril() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_triu(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "triu");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.triu() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
long arg4 = -2;
THByteTensor *arg5 = NULL;
int arg5_idx = 0;
THByteTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THByteTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THByteTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor [index] | [*ByteTensor*] {ByteTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.ByteTensor");
THByteTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int torch_cat(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cat");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cat() function", tname);

  return lua_gettop(L);
}

static long THRandom_random2__(THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  return((THRandom_random(gen) % (b+1-a)) + a);
}

static long THRandom_random1__(THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  return(THRandom_random(gen) % b + 1);
}

static void THByteTensor_random2__(THByteTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(unsigned char, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THByteTensor_random1__(THByteTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(unsigned char, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_ByteTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THByteTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THByteTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *ByteTensor* [Generator] long long | *ByteTensor* [Generator] long | *ByteTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THByteTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THByteTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_random(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "random");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.random() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *ByteTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_geometric(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "geometric");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.geometric() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *ByteTensor* [Generator] [double] | *ByteTensor* [Generator] FloatTensor | *ByteTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_bernoulli(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bernoulli");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bernoulli() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THByteTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
{int hasdims = arg4->nDimension > 1;
THByteTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THByteTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_squeeze(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "squeeze");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.squeeze() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_sign(arg1,arg2);
return 1;
}

static int torch_sign(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sign");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sign() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
unsigned char arg11 = 0;
unsigned char arg12 = 1;
THByteTensor *arg13 = NULL;
THByteTensor *arg14 = NULL;
unsigned char arg15 = 1;
unsigned char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THByteTensor *arg19 = NULL;
int arg19_idx = 0;
unsigned char arg20 = 0;
unsigned char arg21 = 1;
THByteTensor *arg22 = NULL;
THByteTensor *arg23 = NULL;
unsigned char arg24 = 1;
unsigned char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THByteTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THByteTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THByteTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THByteTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~2D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ByteTensor");
THByteTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ByteTensor");
THByteTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_conv2(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "conv2");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.conv2() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
unsigned char arg11 = 0;
unsigned char arg12 = 1;
THByteTensor *arg13 = NULL;
THByteTensor *arg14 = NULL;
unsigned char arg15 = 1;
unsigned char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THByteTensor *arg19 = NULL;
int arg19_idx = 0;
unsigned char arg20 = 0;
unsigned char arg21 = 1;
THByteTensor *arg22 = NULL;
THByteTensor *arg23 = NULL;
unsigned char arg24 = 1;
unsigned char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THByteTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THByteTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THByteTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THByteTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~2D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ByteTensor");
THByteTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ByteTensor");
THByteTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_xcorr2(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "xcorr2");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.xcorr2() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
unsigned char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THByteTensor *arg11 = NULL;
int arg11_idx = 0;
unsigned char arg12 = 0;
unsigned char arg13 = 1;
THByteTensor *arg14 = NULL;
THByteTensor *arg15 = NULL;
unsigned char arg16 = 1;
unsigned char arg17 = 1;
unsigned char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THByteTensor *arg21 = NULL;
int arg21_idx = 0;
unsigned char arg22 = 0;
unsigned char arg23 = 1;
THByteTensor *arg24 = NULL;
THByteTensor *arg25 = NULL;
unsigned char arg26 = 1;
unsigned char arg27 = 1;
unsigned char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THByteTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THByteTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THByteTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THByteTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~4D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ByteTensor");
THByteTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ByteTensor");
THByteTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_conv3(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "conv3");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.conv3() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
unsigned char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THByteTensor *arg11 = NULL;
int arg11_idx = 0;
unsigned char arg12 = 0;
unsigned char arg13 = 1;
THByteTensor *arg14 = NULL;
THByteTensor *arg15 = NULL;
unsigned char arg16 = 1;
unsigned char arg17 = 1;
unsigned char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THByteTensor *arg21 = NULL;
int arg21_idx = 0;
unsigned char arg22 = 0;
unsigned char arg23 = 1;
THByteTensor *arg24 = NULL;
THByteTensor *arg25 = NULL;
unsigned char arg26 = 1;
unsigned char arg27 = 1;
unsigned char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THByteTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THByteTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THByteTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THByteTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~4D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ByteTensor");
THByteTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ByteTensor");
THByteTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_xcorr3(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "xcorr3");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.xcorr3() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_lt(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "lt");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.lt() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_gt(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "gt");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.gt() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_le(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "le");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.le() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ge(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ge");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ge() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_eq(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "eq");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.eq() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ne(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ne");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ne() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THByteTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_nonzero(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "nonzero");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.nonzero() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_all(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_logicalall(arg1);
lua_pushboolean(L, arg2);
return 1;
}

static int torch_all(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "all");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.all() function", tname);

  return lua_gettop(L);
}

static int torch_ByteTensor_any(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_logicalany(arg1);
lua_pushboolean(L, arg2);
return 1;
}

static int torch_any(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "any");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.any() function", tname);

  return lua_gettop(L);
}

#ifndef _CWRAP_STR_ARG_TYPES_4821726c1947cdf3eebacade98173939
#define _CWRAP_STR_ARG_TYPES_4821726c1947cdf3eebacade98173939
#include "string.h"
static void str_arg_types(lua_State *L, char *buf, int n) {
    int i;
  int nargs = lua_gettop(L);
  if (nargs == 0) {
    snprintf(buf, n, "no arguments provided");
    return;
  }
  for (i = 1; i <= nargs; i++) {
    int l;
    const char *torch_type = luaT_typename(L, i);
    if(torch_type && !strncmp(torch_type, "torch.", 6)) torch_type += 6;
    if (torch_type) l = snprintf(buf, n, "%s ", torch_type);
    else if(lua_isnil(L, i)) l = snprintf(buf, n, "%s ", "nil");
    else if(lua_isboolean(L, i)) l = snprintf(buf, n, "%s ", "boolean");
    else if(lua_isnumber(L, i)) l = snprintf(buf, n, "%s ", "number");
    else if(lua_isstring(L, i)) l = snprintf(buf, n, "%s ", "string");
    else if(lua_istable(L, i)) l = snprintf(buf, n, "%s ", "table");
    else if(lua_isuserdata(L, i)) l = snprintf(buf, n, "%s ", "userdata");
    else l = snprintf(buf, n, "%s ", "???");
    if (l >= n) return;
    buf += l;
    n   -= l;
  }
}
#endif
static int m_torch_ByteTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_zero(arg1);
return 1;
}

static int m_torch_ByteTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (unsigned char)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_ByteTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_ByteTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_ByteTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THByteTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_ByteTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THByteTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ByteTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
unsigned char arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* index LongTensor ByteTensor | *ByteTensor* index LongTensor unsigned char", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THByteTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor ByteTensor", type_buf);
}
arg3 = THByteTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_ByteTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor ByteTensor", type_buf);
}
arg3 = THByteTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_ByteTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
THByteTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char | *ByteTensor* [ByteTensor] [unsigned char] ByteTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
THByteTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char | *ByteTensor* [ByteTensor] [unsigned char] ByteTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
unsigned char arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg4 = (unsigned char)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] unsigned char unsigned char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ByteTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* ByteTensor ByteTensor [unsigned char]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ByteTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] [unsigned char] ByteTensor ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_ByteTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor] [unsigned char] ByteTensor ByteTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_ByteTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* ByteTensor~2D ByteTensor~1D", type_buf);
}
THByteTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THByteTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ByteTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* ByteTensor~2D ByteTensor~2D", type_buf);
}
THByteTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THByteTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ByteTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* ByteTensor~3D ByteTensor~3D", type_buf);
}
THByteTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THByteTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ByteTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* ByteTensor~1D ByteTensor~1D", type_buf);
}
THByteTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THByteTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ByteTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
unsigned char arg8 = 0;
THByteTensor *arg9 = NULL;
unsigned char arg10 = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor~1D* [ByteTensor~1D] [unsigned char] ByteTensor~2D ByteTensor~1D | *ByteTensor~1D* unsigned char [ByteTensor~1D] unsigned char ByteTensor~2D ByteTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
unsigned char arg8 = 0;
THByteTensor *arg9 = NULL;
unsigned char arg10 = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor~2D* [ByteTensor~2D] [unsigned char] ByteTensor~2D ByteTensor~2D | *ByteTensor~2D* unsigned char [ByteTensor~2D] unsigned char ByteTensor~2D ByteTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
unsigned char arg8 = 0;
THByteTensor *arg9 = NULL;
unsigned char arg10 = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor~2D* [ByteTensor~2D] [unsigned char] ByteTensor~1D ByteTensor~1D | *ByteTensor~2D* unsigned char [ByteTensor~2D] unsigned char ByteTensor~1D ByteTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
unsigned char arg8 = 0;
THByteTensor *arg9 = NULL;
unsigned char arg10 = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor~2D* [ByteTensor~2D] [unsigned char] ByteTensor~3D ByteTensor~3D | *ByteTensor~2D* unsigned char [ByteTensor~2D] unsigned char ByteTensor~3D ByteTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 1;
THByteTensor *arg3 = NULL;
unsigned char arg4 = 1;
THByteTensor *arg5 = NULL;
THByteTensor *arg6 = NULL;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
unsigned char arg8 = 0;
THByteTensor *arg9 = NULL;
unsigned char arg10 = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ByteTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ByteTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.ByteTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (unsigned char)lua_tonumber(L, 2);
arg10 = (unsigned char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor~3D* [ByteTensor~3D] [unsigned char] ByteTensor~3D ByteTensor~3D | *ByteTensor~3D* unsigned char [ByteTensor~3D] unsigned char ByteTensor~3D ByteTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THByteTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_ByteTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
long arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
THByteTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
long arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
THByteTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THByteTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] [*LongTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THByteTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_ByteTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
unsigned char arg2 = 0;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THByteTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor | [*ByteTensor*] [*LongTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THByteTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THByteTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_ByteTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 1);
arg4 = THByteTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [ByteTensor] ByteTensor | [*ByteTensor*] [ByteTensor] unsigned char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 1);
arg4 = THByteTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (unsigned char)lua_tonumber(L, 2);
arg4 = THByteTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [ByteTensor] ByteTensor | [*ByteTensor*] [ByteTensor] unsigned char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ByteTensor");
THByteTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_ByteTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ByteTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* long long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ByteTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_randperm(arg1,arg2,arg3);

THByteTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_ByteTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ByteTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THByteTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ByteTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THByteTensor_new();
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THByteTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ByteTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ByteTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THByteTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg2_idx = 1;
arg1 = THByteTensor_new();
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THByteTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THByteTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] [*LongTensor*] ByteTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THByteTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ByteTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_ByteTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
long arg4 = -2;
THByteTensor *arg5 = NULL;
int arg5_idx = 0;
THByteTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THByteTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ByteTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THByteTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THByteTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THByteTensor**)THAlloc(arg6_size * sizeof(THByteTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ByteTensor")))
    luaL_error(L, "expected ByteTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor ByteTensor [index] | [*ByteTensor*] {ByteTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.ByteTensor");
THByteTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THByteTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THByteTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *ByteTensor* [Generator] long long | *ByteTensor* [Generator] long | *ByteTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THByteTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THByteTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *ByteTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *ByteTensor* [Generator] [double] | *ByteTensor* [Generator] FloatTensor | *ByteTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THByteTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
THByteTensor *arg3 = NULL;
int arg3_idx = 0;
THByteTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
argset = 1;
arg1 = THByteTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THByteTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor | [*ByteTensor*] ByteTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THByteTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ByteTensor");
{int hasdims = arg4->nDimension > 1;
THByteTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THByteTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_ByteTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ByteTensor* [ByteTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THByteTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_ByteTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
unsigned char arg11 = 0;
unsigned char arg12 = 1;
THByteTensor *arg13 = NULL;
THByteTensor *arg14 = NULL;
unsigned char arg15 = 1;
unsigned char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THByteTensor *arg19 = NULL;
int arg19_idx = 0;
unsigned char arg20 = 0;
unsigned char arg21 = 1;
THByteTensor *arg22 = NULL;
THByteTensor *arg23 = NULL;
unsigned char arg24 = 1;
unsigned char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THByteTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THByteTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THByteTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THByteTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~2D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ByteTensor");
THByteTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ByteTensor");
THByteTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
unsigned char arg11 = 0;
unsigned char arg12 = 1;
THByteTensor *arg13 = NULL;
THByteTensor *arg14 = NULL;
unsigned char arg15 = 1;
unsigned char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THByteTensor *arg19 = NULL;
int arg19_idx = 0;
unsigned char arg20 = 0;
unsigned char arg21 = 1;
THByteTensor *arg22 = NULL;
THByteTensor *arg23 = NULL;
unsigned char arg24 = 1;
unsigned char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THByteTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THByteTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THByteTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THByteTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~2D ByteTensor~2D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~3D ByteTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ByteTensor");
THByteTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ByteTensor");
THByteTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
unsigned char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THByteTensor *arg11 = NULL;
int arg11_idx = 0;
unsigned char arg12 = 0;
unsigned char arg13 = 1;
THByteTensor *arg14 = NULL;
THByteTensor *arg15 = NULL;
unsigned char arg16 = 1;
unsigned char arg17 = 1;
unsigned char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THByteTensor *arg21 = NULL;
int arg21_idx = 0;
unsigned char arg22 = 0;
unsigned char arg23 = 1;
THByteTensor *arg24 = NULL;
THByteTensor *arg25 = NULL;
unsigned char arg26 = 1;
unsigned char arg27 = 1;
unsigned char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THByteTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THByteTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THByteTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THByteTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~4D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ByteTensor");
THByteTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ByteTensor");
THByteTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
unsigned char arg2 = 0;
unsigned char arg3 = 1;
THByteTensor *arg4 = NULL;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 1;
unsigned char arg7 = 1;
unsigned char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THByteTensor *arg11 = NULL;
int arg11_idx = 0;
unsigned char arg12 = 0;
unsigned char arg13 = 1;
THByteTensor *arg14 = NULL;
THByteTensor *arg15 = NULL;
unsigned char arg16 = 1;
unsigned char arg17 = 1;
unsigned char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THByteTensor *arg21 = NULL;
int arg21_idx = 0;
unsigned char arg22 = 0;
unsigned char arg23 = 1;
THByteTensor *arg24 = NULL;
THByteTensor *arg25 = NULL;
unsigned char arg26 = 1;
unsigned char arg27 = 1;
unsigned char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THByteTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THByteTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THByteTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THByteTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THByteTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THByteTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ByteTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ByteTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor~3D ByteTensor~3D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~4D [(V|F)] | [*ByteTensor*] ByteTensor~4D ByteTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ByteTensor");
THByteTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ByteTensor");
THByteTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
unsigned char arg3 = 0;
THByteTensor *arg4 = NULL;
int arg4_idx = 0;
THByteTensor *arg5 = NULL;
unsigned char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THByteTensor *arg8 = NULL;
THByteTensor *arg9 = NULL;
THByteTensor *arg10 = NULL;
int arg10_idx = 0;
THByteTensor *arg11 = NULL;
THByteTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (unsigned char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (unsigned char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ByteTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ByteTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ByteTensor unsigned char | *ByteTensor* ByteTensor unsigned char | [*ByteTensor*] ByteTensor ByteTensor | *ByteTensor* ByteTensor ByteTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THByteTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THByteTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THByteTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THByteTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ByteTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THByteTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ByteTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] ByteTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THByteTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_ByteTensor_all(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_logicalall(arg1);
lua_pushboolean(L, arg2);
return 1;
}

static int m_torch_ByteTensor_any(lua_State *L)
{
int narg = lua_gettop(L);
THByteTensor *arg1 = NULL;
int arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ByteTensor", type_buf);
}
arg2 = THByteTensor_logicalany(arg1);
lua_pushboolean(L, arg2);
return 1;
}

static const struct luaL_Reg m_torch_ByteTensorMath__ [] = {
{"zero", m_torch_ByteTensor_zero},
{"fill", m_torch_ByteTensor_fill},
{"zeros", m_torch_ByteTensor_zeros},
{"ones", m_torch_ByteTensor_ones},
{"reshape", m_torch_ByteTensor_reshape},
{"gather", m_torch_ByteTensor_gather},
{"scatter", m_torch_ByteTensor_scatter},
{"dot", m_torch_ByteTensor_dot},
{"equal", m_torch_ByteTensor_equal},
{"add", m_torch_ByteTensor_add},
{"csub", m_torch_ByteTensor_csub},
{"mul", m_torch_ByteTensor_mul},
{"div", m_torch_ByteTensor_div},
{"lshift", m_torch_ByteTensor_lshift},
{"rshift", m_torch_ByteTensor_rshift},
{"fmod", m_torch_ByteTensor_fmod},
{"remainder", m_torch_ByteTensor_remainder},
{"bitand", m_torch_ByteTensor_bitand},
{"bitor", m_torch_ByteTensor_bitor},
{"bitxor", m_torch_ByteTensor_bitxor},
{"mod", m_torch_ByteTensor_mod},
{"clamp", m_torch_ByteTensor_clamp},
{"match", m_torch_ByteTensor_match},
{"cmul", m_torch_ByteTensor_cmul},
{"cpow", m_torch_ByteTensor_cpow},
{"cdiv", m_torch_ByteTensor_cdiv},
{"clshift", m_torch_ByteTensor_clshift},
{"crshift", m_torch_ByteTensor_crshift},
{"cfmod", m_torch_ByteTensor_cfmod},
{"cremainder", m_torch_ByteTensor_cremainder},
{"cbitand", m_torch_ByteTensor_cbitand},
{"cbitor", m_torch_ByteTensor_cbitor},
{"cbitxor", m_torch_ByteTensor_cbitxor},
{"cmod", m_torch_ByteTensor_cmod},
{"addcmul", m_torch_ByteTensor_addcmul},
{"addcdiv", m_torch_ByteTensor_addcdiv},
{"mv", m_torch_ByteTensor_mv},
{"mm", m_torch_ByteTensor_mm},
{"bmm", m_torch_ByteTensor_bmm},
{"ger", m_torch_ByteTensor_ger},
{"addmv", m_torch_ByteTensor_addmv},
{"addmm", m_torch_ByteTensor_addmm},
{"addr", m_torch_ByteTensor_addr},
{"addbmm", m_torch_ByteTensor_addbmm},
{"baddbmm", m_torch_ByteTensor_baddbmm},
{"numel", m_torch_ByteTensor_numel},
{"cumsum", m_torch_ByteTensor_cumsum},
{"cumprod", m_torch_ByteTensor_cumprod},
{"sum", m_torch_ByteTensor_sum},
{"prod", m_torch_ByteTensor_prod},
{"min", m_torch_ByteTensor_min},
{"max", m_torch_ByteTensor_max},
{"cmin", m_torch_ByteTensor_cmin},
{"cmax", m_torch_ByteTensor_cmax},
{"trace", m_torch_ByteTensor_trace},
{"cross", m_torch_ByteTensor_cross},
{"diag", m_torch_ByteTensor_diag},
{"eye", m_torch_ByteTensor_eye},
{"range", m_torch_ByteTensor_range},
{"randperm", m_torch_ByteTensor_randperm},
{"sort", m_torch_ByteTensor_sort},
{"topk", m_torch_ByteTensor_topk},
{"kthvalue", m_torch_ByteTensor_kthvalue},
{"mode", m_torch_ByteTensor_mode},
{"median", m_torch_ByteTensor_median},
{"tril", m_torch_ByteTensor_tril},
{"triu", m_torch_ByteTensor_triu},
{"cat", m_torch_ByteTensor_cat},
{"random", m_torch_ByteTensor_random},
{"geometric", m_torch_ByteTensor_geometric},
{"bernoulli", m_torch_ByteTensor_bernoulli},
{"squeeze", m_torch_ByteTensor_squeeze},
{"sign", m_torch_ByteTensor_sign},
{"conv2", m_torch_ByteTensor_conv2},
{"xcorr2", m_torch_ByteTensor_xcorr2},
{"conv3", m_torch_ByteTensor_conv3},
{"xcorr3", m_torch_ByteTensor_xcorr3},
{"lt", m_torch_ByteTensor_lt},
{"gt", m_torch_ByteTensor_gt},
{"le", m_torch_ByteTensor_le},
{"ge", m_torch_ByteTensor_ge},
{"eq", m_torch_ByteTensor_eq},
{"ne", m_torch_ByteTensor_ne},
{"nonzero", m_torch_ByteTensor_nonzero},
{"all", m_torch_ByteTensor_all},
{"any", m_torch_ByteTensor_any},
{NULL, NULL}
};

static const struct luaL_Reg torch_ByteTensorMath__ [] = {
{"zero", torch_ByteTensor_zero},
{"fill", torch_ByteTensor_fill},
{"zeros", torch_ByteTensor_zeros},
{"ones", torch_ByteTensor_ones},
{"reshape", torch_ByteTensor_reshape},
{"gather", torch_ByteTensor_gather},
{"scatter", torch_ByteTensor_scatter},
{"dot", torch_ByteTensor_dot},
{"equal", torch_ByteTensor_equal},
{"add", torch_ByteTensor_add},
{"csub", torch_ByteTensor_csub},
{"mul", torch_ByteTensor_mul},
{"div", torch_ByteTensor_div},
{"lshift", torch_ByteTensor_lshift},
{"rshift", torch_ByteTensor_rshift},
{"fmod", torch_ByteTensor_fmod},
{"remainder", torch_ByteTensor_remainder},
{"bitand", torch_ByteTensor_bitand},
{"bitor", torch_ByteTensor_bitor},
{"bitxor", torch_ByteTensor_bitxor},
{"mod", torch_ByteTensor_mod},
{"clamp", torch_ByteTensor_clamp},
{"match", torch_ByteTensor_match},
{"cmul", torch_ByteTensor_cmul},
{"cpow", torch_ByteTensor_cpow},
{"cdiv", torch_ByteTensor_cdiv},
{"clshift", torch_ByteTensor_clshift},
{"crshift", torch_ByteTensor_crshift},
{"cfmod", torch_ByteTensor_cfmod},
{"cremainder", torch_ByteTensor_cremainder},
{"cbitand", torch_ByteTensor_cbitand},
{"cbitor", torch_ByteTensor_cbitor},
{"cbitxor", torch_ByteTensor_cbitxor},
{"cmod", torch_ByteTensor_cmod},
{"addcmul", torch_ByteTensor_addcmul},
{"addcdiv", torch_ByteTensor_addcdiv},
{"mv", torch_ByteTensor_mv},
{"mm", torch_ByteTensor_mm},
{"bmm", torch_ByteTensor_bmm},
{"ger", torch_ByteTensor_ger},
{"addmv", torch_ByteTensor_addmv},
{"addmm", torch_ByteTensor_addmm},
{"addr", torch_ByteTensor_addr},
{"addbmm", torch_ByteTensor_addbmm},
{"baddbmm", torch_ByteTensor_baddbmm},
{"numel", torch_ByteTensor_numel},
{"cumsum", torch_ByteTensor_cumsum},
{"cumprod", torch_ByteTensor_cumprod},
{"sum", torch_ByteTensor_sum},
{"prod", torch_ByteTensor_prod},
{"min", torch_ByteTensor_min},
{"max", torch_ByteTensor_max},
{"cmin", torch_ByteTensor_cmin},
{"cmax", torch_ByteTensor_cmax},
{"trace", torch_ByteTensor_trace},
{"cross", torch_ByteTensor_cross},
{"diag", torch_ByteTensor_diag},
{"eye", torch_ByteTensor_eye},
{"range", torch_ByteTensor_range},
{"randperm", torch_ByteTensor_randperm},
{"sort", torch_ByteTensor_sort},
{"topk", torch_ByteTensor_topk},
{"kthvalue", torch_ByteTensor_kthvalue},
{"mode", torch_ByteTensor_mode},
{"median", torch_ByteTensor_median},
{"tril", torch_ByteTensor_tril},
{"triu", torch_ByteTensor_triu},
{"cat", torch_ByteTensor_cat},
{"random", torch_ByteTensor_random},
{"geometric", torch_ByteTensor_geometric},
{"bernoulli", torch_ByteTensor_bernoulli},
{"squeeze", torch_ByteTensor_squeeze},
{"sign", torch_ByteTensor_sign},
{"conv2", torch_ByteTensor_conv2},
{"xcorr2", torch_ByteTensor_xcorr2},
{"conv3", torch_ByteTensor_conv3},
{"xcorr3", torch_ByteTensor_xcorr3},
{"lt", torch_ByteTensor_lt},
{"gt", torch_ByteTensor_gt},
{"le", torch_ByteTensor_le},
{"ge", torch_ByteTensor_ge},
{"eq", torch_ByteTensor_eq},
{"ne", torch_ByteTensor_ne},
{"nonzero", torch_ByteTensor_nonzero},
{"all", torch_ByteTensor_all},
{"any", torch_ByteTensor_any},
{NULL, NULL}
};

static void torch_ByteTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.ByteTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_ByteTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_ByteTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_CharTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_zero(arg1);
return 1;
}

static int torch_CharTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_fill(arg1,arg2);
return 1;
}

static int torch_CharTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THCharTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_CharTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THCharTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_CharTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THCharTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_CharTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THCharTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_CharTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
char arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* index LongTensor CharTensor | *CharTensor* index LongTensor char", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THCharTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_CharTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor CharTensor", type_buf);
}
arg3 = THCharTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_CharTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor CharTensor", type_buf);
}
arg3 = THCharTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_CharTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 1;
THCharTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 2;
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char | [*CharTensor*] CharTensor [char] CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_CharTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 1;
THCharTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 2;
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char | [*CharTensor*] CharTensor [char] CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_CharTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
char arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor char char", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_CharTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
char arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor [char]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_CharTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [char] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_CharTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg3 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [char] CharTensor CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_CharTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THCharTensor_new();
THCharTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~1D", type_buf);
}
THCharTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THCharTensor_new();
THCharTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~2D", type_buf);
}
THCharTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THCharTensor_new();
THCharTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~3D CharTensor~3D", type_buf);
}
THCharTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THCharTensor_new();
THCharTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~1D CharTensor~1D", type_buf);
}
THCharTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [char] CharTensor~1D [char] CharTensor~2D CharTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [char] CharTensor~2D [char] CharTensor~2D CharTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [char] CharTensor~2D [char] CharTensor~1D CharTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [char] CharTensor~2D [char] CharTensor~3D CharTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (char)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (char)lua_tonumber(L, 1);
arg4 = (char)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [char] CharTensor~3D [char] CharTensor~3D CharTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_CharTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor", type_buf);
}
arg2 = THCharTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_CharTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
long arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
THCharTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_CharTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
long arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
THCharTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_CharTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
char arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THCharTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] [*LongTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THCharTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_CharTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
char arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THCharTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] [*LongTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THCharTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_CharTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor | [*CharTensor*] CharTensor char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_CharTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor | [*CharTensor*] CharTensor char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_CharTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor", type_buf);
}
arg2 = THCharTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_CharTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_CharTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] long long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_CharTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THCharTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_randperm(arg1,arg2,arg3);

THCharTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_CharTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_CharTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THCharTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_CharTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_CharTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_CharTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_CharTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_CharTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
long arg4 = -2;
THCharTensor *arg5 = NULL;
int arg5_idx = 0;
THCharTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THCharTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THCharTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor [index] | [*CharTensor*] {CharTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.CharTensor");
THCharTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THCharTensor_random2__(THCharTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(char, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THCharTensor_random1__(THCharTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(char, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_CharTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THCharTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THCharTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *CharTensor* [Generator] long long | *CharTensor* [Generator] long | *CharTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THCharTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THCharTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_CharTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *CharTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_CharTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *CharTensor* [Generator] [double] | *CharTensor* [Generator] FloatTensor | *CharTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THCharTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
{int hasdims = arg4->nDimension > 1;
THCharTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THCharTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_CharTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_sign(arg1,arg2);
return 1;
}

static int torch_CharTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
char arg11 = 0;
char arg12 = 1;
THCharTensor *arg13 = NULL;
THCharTensor *arg14 = NULL;
char arg15 = 1;
char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THCharTensor *arg19 = NULL;
int arg19_idx = 0;
char arg20 = 0;
char arg21 = 1;
THCharTensor *arg22 = NULL;
THCharTensor *arg23 = NULL;
char arg24 = 1;
char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THCharTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THCharTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THCharTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THCharTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~2D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.CharTensor");
THCharTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.CharTensor");
THCharTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_CharTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
char arg11 = 0;
char arg12 = 1;
THCharTensor *arg13 = NULL;
THCharTensor *arg14 = NULL;
char arg15 = 1;
char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THCharTensor *arg19 = NULL;
int arg19_idx = 0;
char arg20 = 0;
char arg21 = 1;
THCharTensor *arg22 = NULL;
THCharTensor *arg23 = NULL;
char arg24 = 1;
char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THCharTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THCharTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THCharTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THCharTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~2D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.CharTensor");
THCharTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.CharTensor");
THCharTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_CharTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THCharTensor *arg11 = NULL;
int arg11_idx = 0;
char arg12 = 0;
char arg13 = 1;
THCharTensor *arg14 = NULL;
THCharTensor *arg15 = NULL;
char arg16 = 1;
char arg17 = 1;
char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THCharTensor *arg21 = NULL;
int arg21_idx = 0;
char arg22 = 0;
char arg23 = 1;
THCharTensor *arg24 = NULL;
THCharTensor *arg25 = NULL;
char arg26 = 1;
char arg27 = 1;
char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THCharTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THCharTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THCharTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THCharTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~4D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.CharTensor");
THCharTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.CharTensor");
THCharTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_CharTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THCharTensor *arg11 = NULL;
int arg11_idx = 0;
char arg12 = 0;
char arg13 = 1;
THCharTensor *arg14 = NULL;
THCharTensor *arg15 = NULL;
char arg16 = 1;
char arg17 = 1;
char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THCharTensor *arg21 = NULL;
int arg21_idx = 0;
char arg22 = 0;
char arg23 = 1;
THCharTensor *arg24 = NULL;
THCharTensor *arg25 = NULL;
char arg26 = 1;
char arg27 = 1;
char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THCharTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THCharTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THCharTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THCharTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~4D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.CharTensor");
THCharTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.CharTensor");
THCharTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_CharTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_CharTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THCharTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_CharTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_zero(arg1);
return 1;
}

static int m_torch_CharTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (char)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_CharTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_CharTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_CharTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THCharTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_CharTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THCharTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_CharTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
char arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* index LongTensor CharTensor | *CharTensor* index LongTensor char", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THCharTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_CharTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor CharTensor", type_buf);
}
arg3 = THCharTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_CharTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor CharTensor", type_buf);
}
arg3 = THCharTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_CharTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 1;
THCharTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char | *CharTensor* [CharTensor] [char] CharTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_CharTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 1;
THCharTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char | *CharTensor* [CharTensor] [char] CharTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_CharTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
char arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg4 = (char)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] char char", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_CharTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
char arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* CharTensor CharTensor [char]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_CharTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] [char] CharTensor CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_CharTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor] [char] CharTensor CharTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_CharTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* CharTensor~2D CharTensor~1D", type_buf);
}
THCharTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THCharTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_CharTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* CharTensor~2D CharTensor~2D", type_buf);
}
THCharTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THCharTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_CharTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* CharTensor~3D CharTensor~3D", type_buf);
}
THCharTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THCharTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_CharTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* CharTensor~1D CharTensor~1D", type_buf);
}
THCharTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THCharTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_CharTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
char arg8 = 0;
THCharTensor *arg9 = NULL;
char arg10 = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor~1D* [CharTensor~1D] [char] CharTensor~2D CharTensor~1D | *CharTensor~1D* char [CharTensor~1D] char CharTensor~2D CharTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
char arg8 = 0;
THCharTensor *arg9 = NULL;
char arg10 = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor~2D* [CharTensor~2D] [char] CharTensor~2D CharTensor~2D | *CharTensor~2D* char [CharTensor~2D] char CharTensor~2D CharTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
char arg8 = 0;
THCharTensor *arg9 = NULL;
char arg10 = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor~2D* [CharTensor~2D] [char] CharTensor~1D CharTensor~1D | *CharTensor~2D* char [CharTensor~2D] char CharTensor~1D CharTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
char arg8 = 0;
THCharTensor *arg9 = NULL;
char arg10 = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor~2D* [CharTensor~2D] [char] CharTensor~3D CharTensor~3D | *CharTensor~2D* char [CharTensor~2D] char CharTensor~3D CharTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 1;
THCharTensor *arg3 = NULL;
char arg4 = 1;
THCharTensor *arg5 = NULL;
THCharTensor *arg6 = NULL;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
char arg8 = 0;
THCharTensor *arg9 = NULL;
char arg10 = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (char)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.CharTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.CharTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.CharTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (char)lua_tonumber(L, 2);
arg10 = (char)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor~3D* [CharTensor~3D] [char] CharTensor~3D CharTensor~3D | *CharTensor~3D* char [CharTensor~3D] char CharTensor~3D CharTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THCharTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor", type_buf);
}
arg2 = THCharTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_CharTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
long arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
THCharTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_CharTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
long arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
THCharTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_CharTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
char arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THCharTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] [*LongTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THCharTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_CharTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
char arg2 = 0;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THCharTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor | [*CharTensor*] [*LongTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THCharTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THCharTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_CharTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 1);
arg4 = THCharTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [CharTensor] CharTensor | [*CharTensor*] [CharTensor] char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_CharTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 1);
arg4 = THCharTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (char)lua_tonumber(L, 2);
arg4 = THCharTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [CharTensor] CharTensor | [*CharTensor*] [CharTensor] char", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.CharTensor");
THCharTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_CharTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: CharTensor", type_buf);
}
arg2 = THCharTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_CharTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_CharTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* long long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_CharTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_randperm(arg1,arg2,arg3);

THCharTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_CharTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_CharTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THCharTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_CharTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THCharTensor_new();
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THCharTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_CharTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_CharTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THCharTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg2_idx = 1;
arg1 = THCharTensor_new();
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THCharTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THCharTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] [*LongTensor*] CharTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THCharTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_CharTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_CharTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
long arg4 = -2;
THCharTensor *arg5 = NULL;
int arg5_idx = 0;
THCharTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THCharTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.CharTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THCharTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THCharTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.CharTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THCharTensor**)THAlloc(arg6_size * sizeof(THCharTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.CharTensor")))
    luaL_error(L, "expected CharTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor CharTensor [index] | [*CharTensor*] {CharTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.CharTensor");
THCharTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_CharTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THCharTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THCharTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *CharTensor* [Generator] long long | *CharTensor* [Generator] long | *CharTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THCharTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THCharTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_CharTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *CharTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_CharTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THCharTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *CharTensor* [Generator] [double] | *CharTensor* [Generator] FloatTensor | *CharTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THCharTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
THCharTensor *arg3 = NULL;
int arg3_idx = 0;
THCharTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
argset = 1;
arg1 = THCharTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THCharTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor | [*CharTensor*] CharTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THCharTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.CharTensor");
{int hasdims = arg4->nDimension > 1;
THCharTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THCharTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_CharTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *CharTensor* [CharTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THCharTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_CharTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
char arg11 = 0;
char arg12 = 1;
THCharTensor *arg13 = NULL;
THCharTensor *arg14 = NULL;
char arg15 = 1;
char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THCharTensor *arg19 = NULL;
int arg19_idx = 0;
char arg20 = 0;
char arg21 = 1;
THCharTensor *arg22 = NULL;
THCharTensor *arg23 = NULL;
char arg24 = 1;
char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THCharTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THCharTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THCharTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THCharTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~2D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.CharTensor");
THCharTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.CharTensor");
THCharTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_CharTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
char arg11 = 0;
char arg12 = 1;
THCharTensor *arg13 = NULL;
THCharTensor *arg14 = NULL;
char arg15 = 1;
char arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THCharTensor *arg19 = NULL;
int arg19_idx = 0;
char arg20 = 0;
char arg21 = 1;
THCharTensor *arg22 = NULL;
THCharTensor *arg23 = NULL;
char arg24 = 1;
char arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THCharTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THCharTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THCharTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THCharTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~2D CharTensor~2D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~3D CharTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.CharTensor");
THCharTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.CharTensor");
THCharTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_CharTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THCharTensor *arg11 = NULL;
int arg11_idx = 0;
char arg12 = 0;
char arg13 = 1;
THCharTensor *arg14 = NULL;
THCharTensor *arg15 = NULL;
char arg16 = 1;
char arg17 = 1;
char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THCharTensor *arg21 = NULL;
int arg21_idx = 0;
char arg22 = 0;
char arg23 = 1;
THCharTensor *arg24 = NULL;
THCharTensor *arg25 = NULL;
char arg26 = 1;
char arg27 = 1;
char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THCharTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THCharTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THCharTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THCharTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~4D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.CharTensor");
THCharTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.CharTensor");
THCharTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_CharTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THCharTensor *arg1 = NULL;
int arg1_idx = 0;
char arg2 = 0;
char arg3 = 1;
THCharTensor *arg4 = NULL;
THCharTensor *arg5 = NULL;
char arg6 = 1;
char arg7 = 1;
char arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THCharTensor *arg11 = NULL;
int arg11_idx = 0;
char arg12 = 0;
char arg13 = 1;
THCharTensor *arg14 = NULL;
THCharTensor *arg15 = NULL;
char arg16 = 1;
char arg17 = 1;
char arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THCharTensor *arg21 = NULL;
int arg21_idx = 0;
char arg22 = 0;
char arg23 = 1;
THCharTensor *arg24 = NULL;
THCharTensor *arg25 = NULL;
char arg26 = 1;
char arg27 = 1;
char arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THCharTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THCharTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THCharTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THCharTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THCharTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THCharTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.CharTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.CharTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*CharTensor*] CharTensor~3D CharTensor~3D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~4D [(V|F)] | [*CharTensor*] CharTensor~4D CharTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.CharTensor");
THCharTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.CharTensor");
THCharTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.CharTensor");
THCharTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_CharTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
char arg3 = 0;
THCharTensor *arg4 = NULL;
int arg4_idx = 0;
THCharTensor *arg5 = NULL;
char arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THCharTensor *arg8 = NULL;
THCharTensor *arg9 = NULL;
THCharTensor *arg10 = NULL;
int arg10_idx = 0;
THCharTensor *arg11 = NULL;
THCharTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (char)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (char)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.CharTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (char)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.CharTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.CharTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.CharTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] CharTensor char | *CharTensor* CharTensor char | [*ByteTensor*] CharTensor CharTensor | *CharTensor* CharTensor CharTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THCharTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THCharTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THCharTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THCharTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_CharTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THCharTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.CharTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.CharTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] CharTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THCharTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static const struct luaL_Reg m_torch_CharTensorMath__ [] = {
{"zero", m_torch_CharTensor_zero},
{"fill", m_torch_CharTensor_fill},
{"zeros", m_torch_CharTensor_zeros},
{"ones", m_torch_CharTensor_ones},
{"reshape", m_torch_CharTensor_reshape},
{"gather", m_torch_CharTensor_gather},
{"scatter", m_torch_CharTensor_scatter},
{"dot", m_torch_CharTensor_dot},
{"equal", m_torch_CharTensor_equal},
{"add", m_torch_CharTensor_add},
{"csub", m_torch_CharTensor_csub},
{"mul", m_torch_CharTensor_mul},
{"div", m_torch_CharTensor_div},
{"lshift", m_torch_CharTensor_lshift},
{"rshift", m_torch_CharTensor_rshift},
{"fmod", m_torch_CharTensor_fmod},
{"remainder", m_torch_CharTensor_remainder},
{"bitand", m_torch_CharTensor_bitand},
{"bitor", m_torch_CharTensor_bitor},
{"bitxor", m_torch_CharTensor_bitxor},
{"mod", m_torch_CharTensor_mod},
{"clamp", m_torch_CharTensor_clamp},
{"match", m_torch_CharTensor_match},
{"cmul", m_torch_CharTensor_cmul},
{"cpow", m_torch_CharTensor_cpow},
{"cdiv", m_torch_CharTensor_cdiv},
{"clshift", m_torch_CharTensor_clshift},
{"crshift", m_torch_CharTensor_crshift},
{"cfmod", m_torch_CharTensor_cfmod},
{"cremainder", m_torch_CharTensor_cremainder},
{"cbitand", m_torch_CharTensor_cbitand},
{"cbitor", m_torch_CharTensor_cbitor},
{"cbitxor", m_torch_CharTensor_cbitxor},
{"cmod", m_torch_CharTensor_cmod},
{"addcmul", m_torch_CharTensor_addcmul},
{"addcdiv", m_torch_CharTensor_addcdiv},
{"mv", m_torch_CharTensor_mv},
{"mm", m_torch_CharTensor_mm},
{"bmm", m_torch_CharTensor_bmm},
{"ger", m_torch_CharTensor_ger},
{"addmv", m_torch_CharTensor_addmv},
{"addmm", m_torch_CharTensor_addmm},
{"addr", m_torch_CharTensor_addr},
{"addbmm", m_torch_CharTensor_addbmm},
{"baddbmm", m_torch_CharTensor_baddbmm},
{"numel", m_torch_CharTensor_numel},
{"cumsum", m_torch_CharTensor_cumsum},
{"cumprod", m_torch_CharTensor_cumprod},
{"sum", m_torch_CharTensor_sum},
{"prod", m_torch_CharTensor_prod},
{"min", m_torch_CharTensor_min},
{"max", m_torch_CharTensor_max},
{"cmin", m_torch_CharTensor_cmin},
{"cmax", m_torch_CharTensor_cmax},
{"trace", m_torch_CharTensor_trace},
{"cross", m_torch_CharTensor_cross},
{"diag", m_torch_CharTensor_diag},
{"eye", m_torch_CharTensor_eye},
{"range", m_torch_CharTensor_range},
{"randperm", m_torch_CharTensor_randperm},
{"sort", m_torch_CharTensor_sort},
{"topk", m_torch_CharTensor_topk},
{"kthvalue", m_torch_CharTensor_kthvalue},
{"mode", m_torch_CharTensor_mode},
{"median", m_torch_CharTensor_median},
{"tril", m_torch_CharTensor_tril},
{"triu", m_torch_CharTensor_triu},
{"cat", m_torch_CharTensor_cat},
{"random", m_torch_CharTensor_random},
{"geometric", m_torch_CharTensor_geometric},
{"bernoulli", m_torch_CharTensor_bernoulli},
{"squeeze", m_torch_CharTensor_squeeze},
{"sign", m_torch_CharTensor_sign},
{"conv2", m_torch_CharTensor_conv2},
{"xcorr2", m_torch_CharTensor_xcorr2},
{"conv3", m_torch_CharTensor_conv3},
{"xcorr3", m_torch_CharTensor_xcorr3},
{"lt", m_torch_CharTensor_lt},
{"gt", m_torch_CharTensor_gt},
{"le", m_torch_CharTensor_le},
{"ge", m_torch_CharTensor_ge},
{"eq", m_torch_CharTensor_eq},
{"ne", m_torch_CharTensor_ne},
{"nonzero", m_torch_CharTensor_nonzero},
{NULL, NULL}
};

static const struct luaL_Reg torch_CharTensorMath__ [] = {
{"zero", torch_CharTensor_zero},
{"fill", torch_CharTensor_fill},
{"zeros", torch_CharTensor_zeros},
{"ones", torch_CharTensor_ones},
{"reshape", torch_CharTensor_reshape},
{"gather", torch_CharTensor_gather},
{"scatter", torch_CharTensor_scatter},
{"dot", torch_CharTensor_dot},
{"equal", torch_CharTensor_equal},
{"add", torch_CharTensor_add},
{"csub", torch_CharTensor_csub},
{"mul", torch_CharTensor_mul},
{"div", torch_CharTensor_div},
{"lshift", torch_CharTensor_lshift},
{"rshift", torch_CharTensor_rshift},
{"fmod", torch_CharTensor_fmod},
{"remainder", torch_CharTensor_remainder},
{"bitand", torch_CharTensor_bitand},
{"bitor", torch_CharTensor_bitor},
{"bitxor", torch_CharTensor_bitxor},
{"mod", torch_CharTensor_mod},
{"clamp", torch_CharTensor_clamp},
{"match", torch_CharTensor_match},
{"cmul", torch_CharTensor_cmul},
{"cpow", torch_CharTensor_cpow},
{"cdiv", torch_CharTensor_cdiv},
{"clshift", torch_CharTensor_clshift},
{"crshift", torch_CharTensor_crshift},
{"cfmod", torch_CharTensor_cfmod},
{"cremainder", torch_CharTensor_cremainder},
{"cbitand", torch_CharTensor_cbitand},
{"cbitor", torch_CharTensor_cbitor},
{"cbitxor", torch_CharTensor_cbitxor},
{"cmod", torch_CharTensor_cmod},
{"addcmul", torch_CharTensor_addcmul},
{"addcdiv", torch_CharTensor_addcdiv},
{"mv", torch_CharTensor_mv},
{"mm", torch_CharTensor_mm},
{"bmm", torch_CharTensor_bmm},
{"ger", torch_CharTensor_ger},
{"addmv", torch_CharTensor_addmv},
{"addmm", torch_CharTensor_addmm},
{"addr", torch_CharTensor_addr},
{"addbmm", torch_CharTensor_addbmm},
{"baddbmm", torch_CharTensor_baddbmm},
{"numel", torch_CharTensor_numel},
{"cumsum", torch_CharTensor_cumsum},
{"cumprod", torch_CharTensor_cumprod},
{"sum", torch_CharTensor_sum},
{"prod", torch_CharTensor_prod},
{"min", torch_CharTensor_min},
{"max", torch_CharTensor_max},
{"cmin", torch_CharTensor_cmin},
{"cmax", torch_CharTensor_cmax},
{"trace", torch_CharTensor_trace},
{"cross", torch_CharTensor_cross},
{"diag", torch_CharTensor_diag},
{"eye", torch_CharTensor_eye},
{"range", torch_CharTensor_range},
{"randperm", torch_CharTensor_randperm},
{"sort", torch_CharTensor_sort},
{"topk", torch_CharTensor_topk},
{"kthvalue", torch_CharTensor_kthvalue},
{"mode", torch_CharTensor_mode},
{"median", torch_CharTensor_median},
{"tril", torch_CharTensor_tril},
{"triu", torch_CharTensor_triu},
{"cat", torch_CharTensor_cat},
{"random", torch_CharTensor_random},
{"geometric", torch_CharTensor_geometric},
{"bernoulli", torch_CharTensor_bernoulli},
{"squeeze", torch_CharTensor_squeeze},
{"sign", torch_CharTensor_sign},
{"conv2", torch_CharTensor_conv2},
{"xcorr2", torch_CharTensor_xcorr2},
{"conv3", torch_CharTensor_conv3},
{"xcorr3", torch_CharTensor_xcorr3},
{"lt", torch_CharTensor_lt},
{"gt", torch_CharTensor_gt},
{"le", torch_CharTensor_le},
{"ge", torch_CharTensor_ge},
{"eq", torch_CharTensor_eq},
{"ne", torch_CharTensor_ne},
{"nonzero", torch_CharTensor_nonzero},
{NULL, NULL}
};

static void torch_CharTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.CharTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_CharTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_CharTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_ShortTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_zero(arg1);
return 1;
}

static int torch_ShortTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_fill(arg1,arg2);
return 1;
}

static int torch_ShortTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THShortTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_ShortTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THShortTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_ShortTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THShortTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_ShortTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THShortTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_ShortTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
short arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* index LongTensor ShortTensor | *ShortTensor* index LongTensor short", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THShortTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_ShortTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor ShortTensor", type_buf);
}
arg3 = THShortTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_ShortTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor ShortTensor", type_buf);
}
arg3 = THShortTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_ShortTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 1;
THShortTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 2;
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short | [*ShortTensor*] ShortTensor [short] ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_ShortTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 1;
THShortTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 2;
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short | [*ShortTensor*] ShortTensor [short] ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_ShortTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
short arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor short short", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_ShortTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
short arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor [short]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_ShortTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [short] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_ShortTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg3 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [short] ShortTensor ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_ShortTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THShortTensor_new();
THShortTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~1D", type_buf);
}
THShortTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THShortTensor_new();
THShortTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~2D", type_buf);
}
THShortTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THShortTensor_new();
THShortTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~3D ShortTensor~3D", type_buf);
}
THShortTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THShortTensor_new();
THShortTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~1D ShortTensor~1D", type_buf);
}
THShortTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [short] ShortTensor~1D [short] ShortTensor~2D ShortTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [short] ShortTensor~2D [short] ShortTensor~2D ShortTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [short] ShortTensor~2D [short] ShortTensor~1D ShortTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [short] ShortTensor~2D [short] ShortTensor~3D ShortTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (short)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (short)lua_tonumber(L, 1);
arg4 = (short)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [short] ShortTensor~3D [short] ShortTensor~3D ShortTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_ShortTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor", type_buf);
}
arg2 = THShortTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_ShortTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
long arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
THShortTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_ShortTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
long arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
THShortTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_ShortTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
short arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THShortTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] [*LongTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THShortTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_ShortTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
short arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THShortTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] [*LongTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THShortTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_ShortTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor | [*ShortTensor*] ShortTensor short", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_ShortTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor | [*ShortTensor*] ShortTensor short", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_ShortTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor", type_buf);
}
arg2 = THShortTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_ShortTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_ShortTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] long long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_ShortTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THShortTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_randperm(arg1,arg2,arg3);

THShortTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_ShortTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_ShortTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THShortTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_ShortTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_ShortTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_ShortTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_ShortTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_ShortTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
long arg4 = -2;
THShortTensor *arg5 = NULL;
int arg5_idx = 0;
THShortTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THShortTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THShortTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor [index] | [*ShortTensor*] {ShortTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.ShortTensor");
THShortTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THShortTensor_random2__(THShortTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(short, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THShortTensor_random1__(THShortTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(short, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_ShortTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THShortTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THShortTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *ShortTensor* [Generator] long long | *ShortTensor* [Generator] long | *ShortTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THShortTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THShortTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_ShortTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *ShortTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_ShortTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *ShortTensor* [Generator] [double] | *ShortTensor* [Generator] FloatTensor | *ShortTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THShortTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
{int hasdims = arg4->nDimension > 1;
THShortTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THShortTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_ShortTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_sign(arg1,arg2);
return 1;
}

static int torch_ShortTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
short arg11 = 0;
short arg12 = 1;
THShortTensor *arg13 = NULL;
THShortTensor *arg14 = NULL;
short arg15 = 1;
short arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THShortTensor *arg19 = NULL;
int arg19_idx = 0;
short arg20 = 0;
short arg21 = 1;
THShortTensor *arg22 = NULL;
THShortTensor *arg23 = NULL;
short arg24 = 1;
short arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THShortTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THShortTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THShortTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THShortTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~2D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ShortTensor");
THShortTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ShortTensor");
THShortTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_ShortTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
short arg11 = 0;
short arg12 = 1;
THShortTensor *arg13 = NULL;
THShortTensor *arg14 = NULL;
short arg15 = 1;
short arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THShortTensor *arg19 = NULL;
int arg19_idx = 0;
short arg20 = 0;
short arg21 = 1;
THShortTensor *arg22 = NULL;
THShortTensor *arg23 = NULL;
short arg24 = 1;
short arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THShortTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THShortTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THShortTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THShortTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~2D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ShortTensor");
THShortTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ShortTensor");
THShortTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_ShortTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
short arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THShortTensor *arg11 = NULL;
int arg11_idx = 0;
short arg12 = 0;
short arg13 = 1;
THShortTensor *arg14 = NULL;
THShortTensor *arg15 = NULL;
short arg16 = 1;
short arg17 = 1;
short arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THShortTensor *arg21 = NULL;
int arg21_idx = 0;
short arg22 = 0;
short arg23 = 1;
THShortTensor *arg24 = NULL;
THShortTensor *arg25 = NULL;
short arg26 = 1;
short arg27 = 1;
short arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THShortTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THShortTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THShortTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THShortTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~4D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ShortTensor");
THShortTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ShortTensor");
THShortTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_ShortTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
short arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THShortTensor *arg11 = NULL;
int arg11_idx = 0;
short arg12 = 0;
short arg13 = 1;
THShortTensor *arg14 = NULL;
THShortTensor *arg15 = NULL;
short arg16 = 1;
short arg17 = 1;
short arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THShortTensor *arg21 = NULL;
int arg21_idx = 0;
short arg22 = 0;
short arg23 = 1;
THShortTensor *arg24 = NULL;
THShortTensor *arg25 = NULL;
short arg26 = 1;
short arg27 = 1;
short arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THShortTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THShortTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THShortTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THShortTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~4D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ShortTensor");
THShortTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ShortTensor");
THShortTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_ShortTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ShortTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THShortTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_ShortTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_zero(arg1);
return 1;
}

static int m_torch_ShortTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (short)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_ShortTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_ShortTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_ShortTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THShortTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_ShortTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THShortTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ShortTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
short arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* index LongTensor ShortTensor | *ShortTensor* index LongTensor short", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THShortTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor ShortTensor", type_buf);
}
arg3 = THShortTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_ShortTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor ShortTensor", type_buf);
}
arg3 = THShortTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_ShortTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 1;
THShortTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short | *ShortTensor* [ShortTensor] [short] ShortTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 1;
THShortTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short | *ShortTensor* [ShortTensor] [short] ShortTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
short arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg4 = (short)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] short short", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ShortTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
short arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* ShortTensor ShortTensor [short]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ShortTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] [short] ShortTensor ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_ShortTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor] [short] ShortTensor ShortTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_ShortTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* ShortTensor~2D ShortTensor~1D", type_buf);
}
THShortTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THShortTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ShortTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* ShortTensor~2D ShortTensor~2D", type_buf);
}
THShortTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THShortTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ShortTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* ShortTensor~3D ShortTensor~3D", type_buf);
}
THShortTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THShortTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ShortTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* ShortTensor~1D ShortTensor~1D", type_buf);
}
THShortTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THShortTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_ShortTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
short arg8 = 0;
THShortTensor *arg9 = NULL;
short arg10 = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor~1D* [ShortTensor~1D] [short] ShortTensor~2D ShortTensor~1D | *ShortTensor~1D* short [ShortTensor~1D] short ShortTensor~2D ShortTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
short arg8 = 0;
THShortTensor *arg9 = NULL;
short arg10 = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor~2D* [ShortTensor~2D] [short] ShortTensor~2D ShortTensor~2D | *ShortTensor~2D* short [ShortTensor~2D] short ShortTensor~2D ShortTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
short arg8 = 0;
THShortTensor *arg9 = NULL;
short arg10 = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor~2D* [ShortTensor~2D] [short] ShortTensor~1D ShortTensor~1D | *ShortTensor~2D* short [ShortTensor~2D] short ShortTensor~1D ShortTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
short arg8 = 0;
THShortTensor *arg9 = NULL;
short arg10 = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor~2D* [ShortTensor~2D] [short] ShortTensor~3D ShortTensor~3D | *ShortTensor~2D* short [ShortTensor~2D] short ShortTensor~3D ShortTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 1;
THShortTensor *arg3 = NULL;
short arg4 = 1;
THShortTensor *arg5 = NULL;
THShortTensor *arg6 = NULL;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
short arg8 = 0;
THShortTensor *arg9 = NULL;
short arg10 = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (short)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.ShortTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.ShortTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.ShortTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (short)lua_tonumber(L, 2);
arg10 = (short)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor~3D* [ShortTensor~3D] [short] ShortTensor~3D ShortTensor~3D | *ShortTensor~3D* short [ShortTensor~3D] short ShortTensor~3D ShortTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THShortTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor", type_buf);
}
arg2 = THShortTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_ShortTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
long arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
THShortTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
long arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
THShortTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
short arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THShortTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] [*LongTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THShortTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_ShortTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
short arg2 = 0;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THShortTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor | [*ShortTensor*] [*LongTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THShortTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THShortTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_ShortTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 1);
arg4 = THShortTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [ShortTensor] ShortTensor | [*ShortTensor*] [ShortTensor] short", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 1);
arg4 = THShortTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (short)lua_tonumber(L, 2);
arg4 = THShortTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [ShortTensor] ShortTensor | [*ShortTensor*] [ShortTensor] short", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.ShortTensor");
THShortTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: ShortTensor", type_buf);
}
arg2 = THShortTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_ShortTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ShortTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* long long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_ShortTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_randperm(arg1,arg2,arg3);

THShortTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_ShortTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ShortTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THShortTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ShortTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THShortTensor_new();
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THShortTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ShortTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ShortTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THShortTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg2_idx = 1;
arg1 = THShortTensor_new();
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THShortTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THShortTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] [*LongTensor*] ShortTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THShortTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_ShortTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_ShortTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
long arg4 = -2;
THShortTensor *arg5 = NULL;
int arg5_idx = 0;
THShortTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THShortTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.ShortTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THShortTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THShortTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THShortTensor**)THAlloc(arg6_size * sizeof(THShortTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.ShortTensor")))
    luaL_error(L, "expected ShortTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor ShortTensor [index] | [*ShortTensor*] {ShortTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.ShortTensor");
THShortTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THShortTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THShortTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *ShortTensor* [Generator] long long | *ShortTensor* [Generator] long | *ShortTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THShortTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THShortTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *ShortTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THShortTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *ShortTensor* [Generator] [double] | *ShortTensor* [Generator] FloatTensor | *ShortTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THShortTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
THShortTensor *arg3 = NULL;
int arg3_idx = 0;
THShortTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
argset = 1;
arg1 = THShortTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THShortTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor | [*ShortTensor*] ShortTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THShortTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.ShortTensor");
{int hasdims = arg4->nDimension > 1;
THShortTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THShortTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_ShortTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *ShortTensor* [ShortTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THShortTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_ShortTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
short arg11 = 0;
short arg12 = 1;
THShortTensor *arg13 = NULL;
THShortTensor *arg14 = NULL;
short arg15 = 1;
short arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THShortTensor *arg19 = NULL;
int arg19_idx = 0;
short arg20 = 0;
short arg21 = 1;
THShortTensor *arg22 = NULL;
THShortTensor *arg23 = NULL;
short arg24 = 1;
short arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THShortTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THShortTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THShortTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THShortTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~2D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ShortTensor");
THShortTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ShortTensor");
THShortTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
short arg11 = 0;
short arg12 = 1;
THShortTensor *arg13 = NULL;
THShortTensor *arg14 = NULL;
short arg15 = 1;
short arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THShortTensor *arg19 = NULL;
int arg19_idx = 0;
short arg20 = 0;
short arg21 = 1;
THShortTensor *arg22 = NULL;
THShortTensor *arg23 = NULL;
short arg24 = 1;
short arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THShortTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THShortTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THShortTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THShortTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~2D ShortTensor~2D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~3D ShortTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.ShortTensor");
THShortTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.ShortTensor");
THShortTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
short arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THShortTensor *arg11 = NULL;
int arg11_idx = 0;
short arg12 = 0;
short arg13 = 1;
THShortTensor *arg14 = NULL;
THShortTensor *arg15 = NULL;
short arg16 = 1;
short arg17 = 1;
short arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THShortTensor *arg21 = NULL;
int arg21_idx = 0;
short arg22 = 0;
short arg23 = 1;
THShortTensor *arg24 = NULL;
THShortTensor *arg25 = NULL;
short arg26 = 1;
short arg27 = 1;
short arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THShortTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THShortTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THShortTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THShortTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~4D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ShortTensor");
THShortTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ShortTensor");
THShortTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THShortTensor *arg1 = NULL;
int arg1_idx = 0;
short arg2 = 0;
short arg3 = 1;
THShortTensor *arg4 = NULL;
THShortTensor *arg5 = NULL;
short arg6 = 1;
short arg7 = 1;
short arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THShortTensor *arg11 = NULL;
int arg11_idx = 0;
short arg12 = 0;
short arg13 = 1;
THShortTensor *arg14 = NULL;
THShortTensor *arg15 = NULL;
short arg16 = 1;
short arg17 = 1;
short arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THShortTensor *arg21 = NULL;
int arg21_idx = 0;
short arg22 = 0;
short arg23 = 1;
THShortTensor *arg24 = NULL;
THShortTensor *arg25 = NULL;
short arg26 = 1;
short arg27 = 1;
short arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THShortTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THShortTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THShortTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THShortTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THShortTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THShortTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.ShortTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.ShortTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ShortTensor*] ShortTensor~3D ShortTensor~3D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~4D [(V|F)] | [*ShortTensor*] ShortTensor~4D ShortTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ShortTensor");
THShortTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.ShortTensor");
THShortTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.ShortTensor");
THShortTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
short arg3 = 0;
THShortTensor *arg4 = NULL;
int arg4_idx = 0;
THShortTensor *arg5 = NULL;
short arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THShortTensor *arg8 = NULL;
THShortTensor *arg9 = NULL;
THShortTensor *arg10 = NULL;
int arg10_idx = 0;
THShortTensor *arg11 = NULL;
THShortTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (short)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (short)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (short)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.ShortTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.ShortTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.ShortTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] ShortTensor short | *ShortTensor* ShortTensor short | [*ByteTensor*] ShortTensor ShortTensor | *ShortTensor* ShortTensor ShortTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THShortTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THShortTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THShortTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THShortTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_ShortTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THShortTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.ShortTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.ShortTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] ShortTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THShortTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static const struct luaL_Reg m_torch_ShortTensorMath__ [] = {
{"zero", m_torch_ShortTensor_zero},
{"fill", m_torch_ShortTensor_fill},
{"zeros", m_torch_ShortTensor_zeros},
{"ones", m_torch_ShortTensor_ones},
{"reshape", m_torch_ShortTensor_reshape},
{"gather", m_torch_ShortTensor_gather},
{"scatter", m_torch_ShortTensor_scatter},
{"dot", m_torch_ShortTensor_dot},
{"equal", m_torch_ShortTensor_equal},
{"add", m_torch_ShortTensor_add},
{"csub", m_torch_ShortTensor_csub},
{"mul", m_torch_ShortTensor_mul},
{"div", m_torch_ShortTensor_div},
{"lshift", m_torch_ShortTensor_lshift},
{"rshift", m_torch_ShortTensor_rshift},
{"fmod", m_torch_ShortTensor_fmod},
{"remainder", m_torch_ShortTensor_remainder},
{"bitand", m_torch_ShortTensor_bitand},
{"bitor", m_torch_ShortTensor_bitor},
{"bitxor", m_torch_ShortTensor_bitxor},
{"mod", m_torch_ShortTensor_mod},
{"clamp", m_torch_ShortTensor_clamp},
{"match", m_torch_ShortTensor_match},
{"cmul", m_torch_ShortTensor_cmul},
{"cpow", m_torch_ShortTensor_cpow},
{"cdiv", m_torch_ShortTensor_cdiv},
{"clshift", m_torch_ShortTensor_clshift},
{"crshift", m_torch_ShortTensor_crshift},
{"cfmod", m_torch_ShortTensor_cfmod},
{"cremainder", m_torch_ShortTensor_cremainder},
{"cbitand", m_torch_ShortTensor_cbitand},
{"cbitor", m_torch_ShortTensor_cbitor},
{"cbitxor", m_torch_ShortTensor_cbitxor},
{"cmod", m_torch_ShortTensor_cmod},
{"addcmul", m_torch_ShortTensor_addcmul},
{"addcdiv", m_torch_ShortTensor_addcdiv},
{"mv", m_torch_ShortTensor_mv},
{"mm", m_torch_ShortTensor_mm},
{"bmm", m_torch_ShortTensor_bmm},
{"ger", m_torch_ShortTensor_ger},
{"addmv", m_torch_ShortTensor_addmv},
{"addmm", m_torch_ShortTensor_addmm},
{"addr", m_torch_ShortTensor_addr},
{"addbmm", m_torch_ShortTensor_addbmm},
{"baddbmm", m_torch_ShortTensor_baddbmm},
{"numel", m_torch_ShortTensor_numel},
{"cumsum", m_torch_ShortTensor_cumsum},
{"cumprod", m_torch_ShortTensor_cumprod},
{"sum", m_torch_ShortTensor_sum},
{"prod", m_torch_ShortTensor_prod},
{"min", m_torch_ShortTensor_min},
{"max", m_torch_ShortTensor_max},
{"cmin", m_torch_ShortTensor_cmin},
{"cmax", m_torch_ShortTensor_cmax},
{"trace", m_torch_ShortTensor_trace},
{"cross", m_torch_ShortTensor_cross},
{"diag", m_torch_ShortTensor_diag},
{"eye", m_torch_ShortTensor_eye},
{"range", m_torch_ShortTensor_range},
{"randperm", m_torch_ShortTensor_randperm},
{"sort", m_torch_ShortTensor_sort},
{"topk", m_torch_ShortTensor_topk},
{"kthvalue", m_torch_ShortTensor_kthvalue},
{"mode", m_torch_ShortTensor_mode},
{"median", m_torch_ShortTensor_median},
{"tril", m_torch_ShortTensor_tril},
{"triu", m_torch_ShortTensor_triu},
{"cat", m_torch_ShortTensor_cat},
{"random", m_torch_ShortTensor_random},
{"geometric", m_torch_ShortTensor_geometric},
{"bernoulli", m_torch_ShortTensor_bernoulli},
{"squeeze", m_torch_ShortTensor_squeeze},
{"sign", m_torch_ShortTensor_sign},
{"conv2", m_torch_ShortTensor_conv2},
{"xcorr2", m_torch_ShortTensor_xcorr2},
{"conv3", m_torch_ShortTensor_conv3},
{"xcorr3", m_torch_ShortTensor_xcorr3},
{"lt", m_torch_ShortTensor_lt},
{"gt", m_torch_ShortTensor_gt},
{"le", m_torch_ShortTensor_le},
{"ge", m_torch_ShortTensor_ge},
{"eq", m_torch_ShortTensor_eq},
{"ne", m_torch_ShortTensor_ne},
{"nonzero", m_torch_ShortTensor_nonzero},
{NULL, NULL}
};

static const struct luaL_Reg torch_ShortTensorMath__ [] = {
{"zero", torch_ShortTensor_zero},
{"fill", torch_ShortTensor_fill},
{"zeros", torch_ShortTensor_zeros},
{"ones", torch_ShortTensor_ones},
{"reshape", torch_ShortTensor_reshape},
{"gather", torch_ShortTensor_gather},
{"scatter", torch_ShortTensor_scatter},
{"dot", torch_ShortTensor_dot},
{"equal", torch_ShortTensor_equal},
{"add", torch_ShortTensor_add},
{"csub", torch_ShortTensor_csub},
{"mul", torch_ShortTensor_mul},
{"div", torch_ShortTensor_div},
{"lshift", torch_ShortTensor_lshift},
{"rshift", torch_ShortTensor_rshift},
{"fmod", torch_ShortTensor_fmod},
{"remainder", torch_ShortTensor_remainder},
{"bitand", torch_ShortTensor_bitand},
{"bitor", torch_ShortTensor_bitor},
{"bitxor", torch_ShortTensor_bitxor},
{"mod", torch_ShortTensor_mod},
{"clamp", torch_ShortTensor_clamp},
{"match", torch_ShortTensor_match},
{"cmul", torch_ShortTensor_cmul},
{"cpow", torch_ShortTensor_cpow},
{"cdiv", torch_ShortTensor_cdiv},
{"clshift", torch_ShortTensor_clshift},
{"crshift", torch_ShortTensor_crshift},
{"cfmod", torch_ShortTensor_cfmod},
{"cremainder", torch_ShortTensor_cremainder},
{"cbitand", torch_ShortTensor_cbitand},
{"cbitor", torch_ShortTensor_cbitor},
{"cbitxor", torch_ShortTensor_cbitxor},
{"cmod", torch_ShortTensor_cmod},
{"addcmul", torch_ShortTensor_addcmul},
{"addcdiv", torch_ShortTensor_addcdiv},
{"mv", torch_ShortTensor_mv},
{"mm", torch_ShortTensor_mm},
{"bmm", torch_ShortTensor_bmm},
{"ger", torch_ShortTensor_ger},
{"addmv", torch_ShortTensor_addmv},
{"addmm", torch_ShortTensor_addmm},
{"addr", torch_ShortTensor_addr},
{"addbmm", torch_ShortTensor_addbmm},
{"baddbmm", torch_ShortTensor_baddbmm},
{"numel", torch_ShortTensor_numel},
{"cumsum", torch_ShortTensor_cumsum},
{"cumprod", torch_ShortTensor_cumprod},
{"sum", torch_ShortTensor_sum},
{"prod", torch_ShortTensor_prod},
{"min", torch_ShortTensor_min},
{"max", torch_ShortTensor_max},
{"cmin", torch_ShortTensor_cmin},
{"cmax", torch_ShortTensor_cmax},
{"trace", torch_ShortTensor_trace},
{"cross", torch_ShortTensor_cross},
{"diag", torch_ShortTensor_diag},
{"eye", torch_ShortTensor_eye},
{"range", torch_ShortTensor_range},
{"randperm", torch_ShortTensor_randperm},
{"sort", torch_ShortTensor_sort},
{"topk", torch_ShortTensor_topk},
{"kthvalue", torch_ShortTensor_kthvalue},
{"mode", torch_ShortTensor_mode},
{"median", torch_ShortTensor_median},
{"tril", torch_ShortTensor_tril},
{"triu", torch_ShortTensor_triu},
{"cat", torch_ShortTensor_cat},
{"random", torch_ShortTensor_random},
{"geometric", torch_ShortTensor_geometric},
{"bernoulli", torch_ShortTensor_bernoulli},
{"squeeze", torch_ShortTensor_squeeze},
{"sign", torch_ShortTensor_sign},
{"conv2", torch_ShortTensor_conv2},
{"xcorr2", torch_ShortTensor_xcorr2},
{"conv3", torch_ShortTensor_conv3},
{"xcorr3", torch_ShortTensor_xcorr3},
{"lt", torch_ShortTensor_lt},
{"gt", torch_ShortTensor_gt},
{"le", torch_ShortTensor_le},
{"ge", torch_ShortTensor_ge},
{"eq", torch_ShortTensor_eq},
{"ne", torch_ShortTensor_ne},
{"nonzero", torch_ShortTensor_nonzero},
{NULL, NULL}
};

static void torch_ShortTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.ShortTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_ShortTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_ShortTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_IntTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_zero(arg1);
return 1;
}

static int torch_IntTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_fill(arg1,arg2);
return 1;
}

static int torch_IntTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THIntTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_IntTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THIntTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_IntTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THIntTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_IntTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THIntTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_IntTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
int arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* index LongTensor IntTensor | *IntTensor* index LongTensor int", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THIntTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_IntTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor IntTensor", type_buf);
}
arg3 = THIntTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_IntTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor IntTensor", type_buf);
}
arg3 = THIntTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_IntTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 1;
THIntTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 2;
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int | [*IntTensor*] IntTensor [int] IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_IntTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 1;
THIntTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 2;
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int | [*IntTensor*] IntTensor [int] IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_IntTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
int arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor int int", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_IntTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
int arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_IntTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_IntTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int] IntTensor IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_IntTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THIntTensor_new();
THIntTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~1D", type_buf);
}
THIntTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THIntTensor_new();
THIntTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~2D", type_buf);
}
THIntTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THIntTensor_new();
THIntTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~3D IntTensor~3D", type_buf);
}
THIntTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THIntTensor_new();
THIntTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~1D IntTensor~1D", type_buf);
}
THIntTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [int] IntTensor~1D [int] IntTensor~2D IntTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [int] IntTensor~2D [int] IntTensor~2D IntTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [int] IntTensor~2D [int] IntTensor~1D IntTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [int] IntTensor~2D [int] IntTensor~3D IntTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (int)lua_tonumber(L, 1);
arg4 = (int)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [int] IntTensor~3D [int] IntTensor~3D IntTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_IntTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor", type_buf);
}
arg2 = THIntTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_IntTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
long arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
THIntTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_IntTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
long arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
THIntTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_IntTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THIntTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] [*LongTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THIntTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_IntTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THIntTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] [*LongTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THIntTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_IntTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor | [*IntTensor*] IntTensor int", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_IntTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor | [*IntTensor*] IntTensor int", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_IntTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor", type_buf);
}
arg2 = THIntTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_IntTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_IntTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] long long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_IntTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THIntTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_randperm(arg1,arg2,arg3);

THIntTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_IntTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_IntTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THIntTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_IntTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_IntTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_IntTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_IntTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_IntTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
long arg4 = -2;
THIntTensor *arg5 = NULL;
int arg5_idx = 0;
THIntTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THIntTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THIntTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor [index] | [*IntTensor*] {IntTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.IntTensor");
THIntTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THIntTensor_random2__(THIntTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(int, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THIntTensor_random1__(THIntTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(int, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_IntTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THIntTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THIntTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *IntTensor* [Generator] long long | *IntTensor* [Generator] long | *IntTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THIntTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THIntTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_IntTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *IntTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_IntTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *IntTensor* [Generator] [double] | *IntTensor* [Generator] FloatTensor | *IntTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THIntTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
{int hasdims = arg4->nDimension > 1;
THIntTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THIntTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_IntTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_sign(arg1,arg2);
return 1;
}

static int torch_IntTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
int arg11 = 0;
int arg12 = 1;
THIntTensor *arg13 = NULL;
THIntTensor *arg14 = NULL;
int arg15 = 1;
int arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THIntTensor *arg19 = NULL;
int arg19_idx = 0;
int arg20 = 0;
int arg21 = 1;
THIntTensor *arg22 = NULL;
THIntTensor *arg23 = NULL;
int arg24 = 1;
int arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THIntTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THIntTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THIntTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THIntTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~2D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.IntTensor");
THIntTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.IntTensor");
THIntTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_IntTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
int arg11 = 0;
int arg12 = 1;
THIntTensor *arg13 = NULL;
THIntTensor *arg14 = NULL;
int arg15 = 1;
int arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THIntTensor *arg19 = NULL;
int arg19_idx = 0;
int arg20 = 0;
int arg21 = 1;
THIntTensor *arg22 = NULL;
THIntTensor *arg23 = NULL;
int arg24 = 1;
int arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THIntTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THIntTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THIntTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THIntTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~2D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.IntTensor");
THIntTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.IntTensor");
THIntTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_IntTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
int arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THIntTensor *arg11 = NULL;
int arg11_idx = 0;
int arg12 = 0;
int arg13 = 1;
THIntTensor *arg14 = NULL;
THIntTensor *arg15 = NULL;
int arg16 = 1;
int arg17 = 1;
int arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THIntTensor *arg21 = NULL;
int arg21_idx = 0;
int arg22 = 0;
int arg23 = 1;
THIntTensor *arg24 = NULL;
THIntTensor *arg25 = NULL;
int arg26 = 1;
int arg27 = 1;
int arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THIntTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THIntTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THIntTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THIntTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~4D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.IntTensor");
THIntTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.IntTensor");
THIntTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_IntTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
int arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THIntTensor *arg11 = NULL;
int arg11_idx = 0;
int arg12 = 0;
int arg13 = 1;
THIntTensor *arg14 = NULL;
THIntTensor *arg15 = NULL;
int arg16 = 1;
int arg17 = 1;
int arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THIntTensor *arg21 = NULL;
int arg21_idx = 0;
int arg22 = 0;
int arg23 = 1;
THIntTensor *arg24 = NULL;
THIntTensor *arg25 = NULL;
int arg26 = 1;
int arg27 = 1;
int arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THIntTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THIntTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THIntTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THIntTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~4D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.IntTensor");
THIntTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.IntTensor");
THIntTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_IntTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_IntTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THIntTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_IntTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
int arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (int)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor | int", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = abs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_abs(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "abs");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.abs() function", tname);

  return lua_gettop(L);
}

static int m_torch_IntTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_zero(arg1);
return 1;
}

static int m_torch_IntTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (int)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_IntTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_IntTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_IntTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THIntTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_IntTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THIntTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_IntTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
int arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* index LongTensor IntTensor | *IntTensor* index LongTensor int", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THIntTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_IntTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor IntTensor", type_buf);
}
arg3 = THIntTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_IntTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor IntTensor", type_buf);
}
arg3 = THIntTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_IntTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 1;
THIntTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int | *IntTensor* [IntTensor] [int] IntTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_IntTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 1;
THIntTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int | *IntTensor* [IntTensor] [int] IntTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_IntTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
int arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg4 = (int)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] int int", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_IntTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
int arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* IntTensor IntTensor [int]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_IntTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] [int] IntTensor IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_IntTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] [int] IntTensor IntTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_IntTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* IntTensor~2D IntTensor~1D", type_buf);
}
THIntTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THIntTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_IntTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* IntTensor~2D IntTensor~2D", type_buf);
}
THIntTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THIntTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_IntTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* IntTensor~3D IntTensor~3D", type_buf);
}
THIntTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THIntTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_IntTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* IntTensor~1D IntTensor~1D", type_buf);
}
THIntTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THIntTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_IntTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
int arg8 = 0;
THIntTensor *arg9 = NULL;
int arg10 = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor~1D* [IntTensor~1D] [int] IntTensor~2D IntTensor~1D | *IntTensor~1D* int [IntTensor~1D] int IntTensor~2D IntTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
int arg8 = 0;
THIntTensor *arg9 = NULL;
int arg10 = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor~2D* [IntTensor~2D] [int] IntTensor~2D IntTensor~2D | *IntTensor~2D* int [IntTensor~2D] int IntTensor~2D IntTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
int arg8 = 0;
THIntTensor *arg9 = NULL;
int arg10 = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor~2D* [IntTensor~2D] [int] IntTensor~1D IntTensor~1D | *IntTensor~2D* int [IntTensor~2D] int IntTensor~1D IntTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
int arg8 = 0;
THIntTensor *arg9 = NULL;
int arg10 = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor~2D* [IntTensor~2D] [int] IntTensor~3D IntTensor~3D | *IntTensor~2D* int [IntTensor~2D] int IntTensor~3D IntTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 1;
THIntTensor *arg3 = NULL;
int arg4 = 1;
THIntTensor *arg5 = NULL;
THIntTensor *arg6 = NULL;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
int arg8 = 0;
THIntTensor *arg9 = NULL;
int arg10 = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.IntTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.IntTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.IntTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (int)lua_tonumber(L, 2);
arg10 = (int)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor~3D* [IntTensor~3D] [int] IntTensor~3D IntTensor~3D | *IntTensor~3D* int [IntTensor~3D] int IntTensor~3D IntTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor", type_buf);
}
arg2 = THIntTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_IntTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
long arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
THIntTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_IntTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
long arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
THIntTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_IntTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THIntTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] [*LongTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THIntTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_IntTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg2 = 0;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THIntTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor | [*IntTensor*] [*LongTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THIntTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THIntTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_IntTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 1);
arg4 = THIntTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [IntTensor] IntTensor | [*IntTensor*] [IntTensor] int", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_IntTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 1);
arg4 = THIntTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (int)lua_tonumber(L, 2);
arg4 = THIntTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [IntTensor] IntTensor | [*IntTensor*] [IntTensor] int", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.IntTensor");
THIntTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_IntTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: IntTensor", type_buf);
}
arg2 = THIntTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_IntTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_IntTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* long long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_IntTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_randperm(arg1,arg2,arg3);

THIntTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_IntTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_IntTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THIntTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_IntTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THIntTensor_new();
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THIntTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_IntTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_IntTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THIntTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg2_idx = 1;
arg1 = THIntTensor_new();
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THIntTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THIntTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] [*LongTensor*] IntTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THIntTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_IntTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_IntTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
long arg4 = -2;
THIntTensor *arg5 = NULL;
int arg5_idx = 0;
THIntTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THIntTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.IntTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THIntTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THIntTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.IntTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THIntTensor**)THAlloc(arg6_size * sizeof(THIntTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.IntTensor")))
    luaL_error(L, "expected IntTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor IntTensor [index] | [*IntTensor*] {IntTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.IntTensor");
THIntTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_IntTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THIntTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THIntTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *IntTensor* [Generator] long long | *IntTensor* [Generator] long | *IntTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THIntTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THIntTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_IntTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *IntTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_IntTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *IntTensor* [Generator] [double] | *IntTensor* [Generator] FloatTensor | *IntTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THIntTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
THIntTensor *arg3 = NULL;
int arg3_idx = 0;
THIntTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1 = THIntTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THIntTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor | [*IntTensor*] IntTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THIntTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.IntTensor");
{int hasdims = arg4->nDimension > 1;
THIntTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THIntTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_IntTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THIntTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_IntTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
int arg11 = 0;
int arg12 = 1;
THIntTensor *arg13 = NULL;
THIntTensor *arg14 = NULL;
int arg15 = 1;
int arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THIntTensor *arg19 = NULL;
int arg19_idx = 0;
int arg20 = 0;
int arg21 = 1;
THIntTensor *arg22 = NULL;
THIntTensor *arg23 = NULL;
int arg24 = 1;
int arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THIntTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THIntTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THIntTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THIntTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~2D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.IntTensor");
THIntTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.IntTensor");
THIntTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_IntTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
int arg11 = 0;
int arg12 = 1;
THIntTensor *arg13 = NULL;
THIntTensor *arg14 = NULL;
int arg15 = 1;
int arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THIntTensor *arg19 = NULL;
int arg19_idx = 0;
int arg20 = 0;
int arg21 = 1;
THIntTensor *arg22 = NULL;
THIntTensor *arg23 = NULL;
int arg24 = 1;
int arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THIntTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THIntTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THIntTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THIntTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~2D IntTensor~2D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~3D IntTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.IntTensor");
THIntTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.IntTensor");
THIntTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_IntTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
int arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THIntTensor *arg11 = NULL;
int arg11_idx = 0;
int arg12 = 0;
int arg13 = 1;
THIntTensor *arg14 = NULL;
THIntTensor *arg15 = NULL;
int arg16 = 1;
int arg17 = 1;
int arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THIntTensor *arg21 = NULL;
int arg21_idx = 0;
int arg22 = 0;
int arg23 = 1;
THIntTensor *arg24 = NULL;
THIntTensor *arg25 = NULL;
int arg26 = 1;
int arg27 = 1;
int arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THIntTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THIntTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THIntTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THIntTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~4D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.IntTensor");
THIntTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.IntTensor");
THIntTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_IntTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
int arg2 = 0;
int arg3 = 1;
THIntTensor *arg4 = NULL;
THIntTensor *arg5 = NULL;
int arg6 = 1;
int arg7 = 1;
int arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THIntTensor *arg11 = NULL;
int arg11_idx = 0;
int arg12 = 0;
int arg13 = 1;
THIntTensor *arg14 = NULL;
THIntTensor *arg15 = NULL;
int arg16 = 1;
int arg17 = 1;
int arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THIntTensor *arg21 = NULL;
int arg21_idx = 0;
int arg22 = 0;
int arg23 = 1;
THIntTensor *arg24 = NULL;
THIntTensor *arg25 = NULL;
int arg26 = 1;
int arg27 = 1;
int arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THIntTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THIntTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THIntTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THIntTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THIntTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THIntTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.IntTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.IntTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*IntTensor*] IntTensor~3D IntTensor~3D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~4D [(V|F)] | [*IntTensor*] IntTensor~4D IntTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.IntTensor");
THIntTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.IntTensor");
THIntTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.IntTensor");
THIntTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_IntTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
THIntTensor *arg4 = NULL;
int arg4_idx = 0;
THIntTensor *arg5 = NULL;
int arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THIntTensor *arg8 = NULL;
THIntTensor *arg9 = NULL;
THIntTensor *arg10 = NULL;
int arg10_idx = 0;
THIntTensor *arg11 = NULL;
THIntTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (int)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.IntTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (int)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.IntTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] IntTensor int | *IntTensor* IntTensor int | [*ByteTensor*] IntTensor IntTensor | *IntTensor* IntTensor IntTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THIntTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THIntTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THIntTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THIntTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_IntTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] IntTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THIntTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_IntTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THIntTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg3 = 0;
int arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.IntTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (int)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *IntTensor* [IntTensor] | int", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THIntTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = abs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static const struct luaL_Reg m_torch_IntTensorMath__ [] = {
{"zero", m_torch_IntTensor_zero},
{"fill", m_torch_IntTensor_fill},
{"zeros", m_torch_IntTensor_zeros},
{"ones", m_torch_IntTensor_ones},
{"reshape", m_torch_IntTensor_reshape},
{"gather", m_torch_IntTensor_gather},
{"scatter", m_torch_IntTensor_scatter},
{"dot", m_torch_IntTensor_dot},
{"equal", m_torch_IntTensor_equal},
{"add", m_torch_IntTensor_add},
{"csub", m_torch_IntTensor_csub},
{"mul", m_torch_IntTensor_mul},
{"div", m_torch_IntTensor_div},
{"lshift", m_torch_IntTensor_lshift},
{"rshift", m_torch_IntTensor_rshift},
{"fmod", m_torch_IntTensor_fmod},
{"remainder", m_torch_IntTensor_remainder},
{"bitand", m_torch_IntTensor_bitand},
{"bitor", m_torch_IntTensor_bitor},
{"bitxor", m_torch_IntTensor_bitxor},
{"mod", m_torch_IntTensor_mod},
{"clamp", m_torch_IntTensor_clamp},
{"match", m_torch_IntTensor_match},
{"cmul", m_torch_IntTensor_cmul},
{"cpow", m_torch_IntTensor_cpow},
{"cdiv", m_torch_IntTensor_cdiv},
{"clshift", m_torch_IntTensor_clshift},
{"crshift", m_torch_IntTensor_crshift},
{"cfmod", m_torch_IntTensor_cfmod},
{"cremainder", m_torch_IntTensor_cremainder},
{"cbitand", m_torch_IntTensor_cbitand},
{"cbitor", m_torch_IntTensor_cbitor},
{"cbitxor", m_torch_IntTensor_cbitxor},
{"cmod", m_torch_IntTensor_cmod},
{"addcmul", m_torch_IntTensor_addcmul},
{"addcdiv", m_torch_IntTensor_addcdiv},
{"mv", m_torch_IntTensor_mv},
{"mm", m_torch_IntTensor_mm},
{"bmm", m_torch_IntTensor_bmm},
{"ger", m_torch_IntTensor_ger},
{"addmv", m_torch_IntTensor_addmv},
{"addmm", m_torch_IntTensor_addmm},
{"addr", m_torch_IntTensor_addr},
{"addbmm", m_torch_IntTensor_addbmm},
{"baddbmm", m_torch_IntTensor_baddbmm},
{"numel", m_torch_IntTensor_numel},
{"cumsum", m_torch_IntTensor_cumsum},
{"cumprod", m_torch_IntTensor_cumprod},
{"sum", m_torch_IntTensor_sum},
{"prod", m_torch_IntTensor_prod},
{"min", m_torch_IntTensor_min},
{"max", m_torch_IntTensor_max},
{"cmin", m_torch_IntTensor_cmin},
{"cmax", m_torch_IntTensor_cmax},
{"trace", m_torch_IntTensor_trace},
{"cross", m_torch_IntTensor_cross},
{"diag", m_torch_IntTensor_diag},
{"eye", m_torch_IntTensor_eye},
{"range", m_torch_IntTensor_range},
{"randperm", m_torch_IntTensor_randperm},
{"sort", m_torch_IntTensor_sort},
{"topk", m_torch_IntTensor_topk},
{"kthvalue", m_torch_IntTensor_kthvalue},
{"mode", m_torch_IntTensor_mode},
{"median", m_torch_IntTensor_median},
{"tril", m_torch_IntTensor_tril},
{"triu", m_torch_IntTensor_triu},
{"cat", m_torch_IntTensor_cat},
{"random", m_torch_IntTensor_random},
{"geometric", m_torch_IntTensor_geometric},
{"bernoulli", m_torch_IntTensor_bernoulli},
{"squeeze", m_torch_IntTensor_squeeze},
{"sign", m_torch_IntTensor_sign},
{"conv2", m_torch_IntTensor_conv2},
{"xcorr2", m_torch_IntTensor_xcorr2},
{"conv3", m_torch_IntTensor_conv3},
{"xcorr3", m_torch_IntTensor_xcorr3},
{"lt", m_torch_IntTensor_lt},
{"gt", m_torch_IntTensor_gt},
{"le", m_torch_IntTensor_le},
{"ge", m_torch_IntTensor_ge},
{"eq", m_torch_IntTensor_eq},
{"ne", m_torch_IntTensor_ne},
{"nonzero", m_torch_IntTensor_nonzero},
{"abs", m_torch_IntTensor_abs},
{NULL, NULL}
};

static const struct luaL_Reg torch_IntTensorMath__ [] = {
{"zero", torch_IntTensor_zero},
{"fill", torch_IntTensor_fill},
{"zeros", torch_IntTensor_zeros},
{"ones", torch_IntTensor_ones},
{"reshape", torch_IntTensor_reshape},
{"gather", torch_IntTensor_gather},
{"scatter", torch_IntTensor_scatter},
{"dot", torch_IntTensor_dot},
{"equal", torch_IntTensor_equal},
{"add", torch_IntTensor_add},
{"csub", torch_IntTensor_csub},
{"mul", torch_IntTensor_mul},
{"div", torch_IntTensor_div},
{"lshift", torch_IntTensor_lshift},
{"rshift", torch_IntTensor_rshift},
{"fmod", torch_IntTensor_fmod},
{"remainder", torch_IntTensor_remainder},
{"bitand", torch_IntTensor_bitand},
{"bitor", torch_IntTensor_bitor},
{"bitxor", torch_IntTensor_bitxor},
{"mod", torch_IntTensor_mod},
{"clamp", torch_IntTensor_clamp},
{"match", torch_IntTensor_match},
{"cmul", torch_IntTensor_cmul},
{"cpow", torch_IntTensor_cpow},
{"cdiv", torch_IntTensor_cdiv},
{"clshift", torch_IntTensor_clshift},
{"crshift", torch_IntTensor_crshift},
{"cfmod", torch_IntTensor_cfmod},
{"cremainder", torch_IntTensor_cremainder},
{"cbitand", torch_IntTensor_cbitand},
{"cbitor", torch_IntTensor_cbitor},
{"cbitxor", torch_IntTensor_cbitxor},
{"cmod", torch_IntTensor_cmod},
{"addcmul", torch_IntTensor_addcmul},
{"addcdiv", torch_IntTensor_addcdiv},
{"mv", torch_IntTensor_mv},
{"mm", torch_IntTensor_mm},
{"bmm", torch_IntTensor_bmm},
{"ger", torch_IntTensor_ger},
{"addmv", torch_IntTensor_addmv},
{"addmm", torch_IntTensor_addmm},
{"addr", torch_IntTensor_addr},
{"addbmm", torch_IntTensor_addbmm},
{"baddbmm", torch_IntTensor_baddbmm},
{"numel", torch_IntTensor_numel},
{"cumsum", torch_IntTensor_cumsum},
{"cumprod", torch_IntTensor_cumprod},
{"sum", torch_IntTensor_sum},
{"prod", torch_IntTensor_prod},
{"min", torch_IntTensor_min},
{"max", torch_IntTensor_max},
{"cmin", torch_IntTensor_cmin},
{"cmax", torch_IntTensor_cmax},
{"trace", torch_IntTensor_trace},
{"cross", torch_IntTensor_cross},
{"diag", torch_IntTensor_diag},
{"eye", torch_IntTensor_eye},
{"range", torch_IntTensor_range},
{"randperm", torch_IntTensor_randperm},
{"sort", torch_IntTensor_sort},
{"topk", torch_IntTensor_topk},
{"kthvalue", torch_IntTensor_kthvalue},
{"mode", torch_IntTensor_mode},
{"median", torch_IntTensor_median},
{"tril", torch_IntTensor_tril},
{"triu", torch_IntTensor_triu},
{"cat", torch_IntTensor_cat},
{"random", torch_IntTensor_random},
{"geometric", torch_IntTensor_geometric},
{"bernoulli", torch_IntTensor_bernoulli},
{"squeeze", torch_IntTensor_squeeze},
{"sign", torch_IntTensor_sign},
{"conv2", torch_IntTensor_conv2},
{"xcorr2", torch_IntTensor_xcorr2},
{"conv3", torch_IntTensor_conv3},
{"xcorr3", torch_IntTensor_xcorr3},
{"lt", torch_IntTensor_lt},
{"gt", torch_IntTensor_gt},
{"le", torch_IntTensor_le},
{"ge", torch_IntTensor_ge},
{"eq", torch_IntTensor_eq},
{"ne", torch_IntTensor_ne},
{"nonzero", torch_IntTensor_nonzero},
{"abs", torch_IntTensor_abs},
{NULL, NULL}
};

static void torch_IntTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.IntTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_IntTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_IntTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_LongTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_zero(arg1);
return 1;
}

static int torch_LongTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_fill(arg1,arg2);
return 1;
}

static int torch_LongTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THLongTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_LongTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THLongTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_LongTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THLongTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_LongTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THLongTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_LongTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
long arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* index LongTensor LongTensor | *LongTensor* index LongTensor long", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THLongTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_LongTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor LongTensor", type_buf);
}
arg3 = THLongTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_LongTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor LongTensor", type_buf);
}
arg3 = THLongTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_LongTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 1;
THLongTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 2;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long | [*LongTensor*] LongTensor [long] LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_LongTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 1;
THLongTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 2;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long | [*LongTensor*] LongTensor [long] LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_LongTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
long arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor long long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_LongTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_LongTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [long] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_LongTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [long] LongTensor LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_LongTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THLongTensor_new();
THLongTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~1D", type_buf);
}
THLongTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THLongTensor_new();
THLongTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~2D", type_buf);
}
THLongTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THLongTensor_new();
THLongTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~3D LongTensor~3D", type_buf);
}
THLongTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THLongTensor_new();
THLongTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~1D LongTensor~1D", type_buf);
}
THLongTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [long] LongTensor~1D [long] LongTensor~2D LongTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [long] LongTensor~2D [long] LongTensor~2D LongTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [long] LongTensor~2D [long] LongTensor~1D LongTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [long] LongTensor~2D [long] LongTensor~3D LongTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [long] LongTensor~3D [long] LongTensor~3D LongTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_LongTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor", type_buf);
}
arg2 = THLongTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_LongTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
THLongTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_LongTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
THLongTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_LongTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THLongTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_LongTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THLongTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_LongTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor | [*LongTensor*] LongTensor long", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_LongTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor | [*LongTensor*] LongTensor long", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_LongTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor", type_buf);
}
arg2 = THLongTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_LongTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_LongTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] long long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_LongTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THLongTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_randperm(arg1,arg2,arg3);

THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_LongTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_LongTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THLongTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_LongTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_LongTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_LongTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_LongTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_LongTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = -2;
THLongTensor *arg5 = NULL;
int arg5_idx = 0;
THLongTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THLongTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THLongTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor [index] | [*LongTensor*] {LongTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.LongTensor");
THLongTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THLongTensor_random2__(THLongTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(long, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THLongTensor_random1__(THLongTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(long, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_LongTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THLongTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THLongTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *LongTensor* [Generator] long long | *LongTensor* [Generator] long | *LongTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THLongTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THLongTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_LongTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *LongTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_LongTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *LongTensor* [Generator] [double] | *LongTensor* [Generator] FloatTensor | *LongTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THLongTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
{int hasdims = arg4->nDimension > 1;
THLongTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THLongTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_LongTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_sign(arg1,arg2);
return 1;
}

static int torch_LongTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
long arg11 = 0;
long arg12 = 1;
THLongTensor *arg13 = NULL;
THLongTensor *arg14 = NULL;
long arg15 = 1;
long arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THLongTensor *arg19 = NULL;
int arg19_idx = 0;
long arg20 = 0;
long arg21 = 1;
THLongTensor *arg22 = NULL;
THLongTensor *arg23 = NULL;
long arg24 = 1;
long arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THLongTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THLongTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THLongTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THLongTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~2D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.LongTensor");
THLongTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.LongTensor");
THLongTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_LongTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
long arg11 = 0;
long arg12 = 1;
THLongTensor *arg13 = NULL;
THLongTensor *arg14 = NULL;
long arg15 = 1;
long arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THLongTensor *arg19 = NULL;
int arg19_idx = 0;
long arg20 = 0;
long arg21 = 1;
THLongTensor *arg22 = NULL;
THLongTensor *arg23 = NULL;
long arg24 = 1;
long arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THLongTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THLongTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THLongTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THLongTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~2D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.LongTensor");
THLongTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.LongTensor");
THLongTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_LongTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
long arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THLongTensor *arg11 = NULL;
int arg11_idx = 0;
long arg12 = 0;
long arg13 = 1;
THLongTensor *arg14 = NULL;
THLongTensor *arg15 = NULL;
long arg16 = 1;
long arg17 = 1;
long arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THLongTensor *arg21 = NULL;
int arg21_idx = 0;
long arg22 = 0;
long arg23 = 1;
THLongTensor *arg24 = NULL;
THLongTensor *arg25 = NULL;
long arg26 = 1;
long arg27 = 1;
long arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THLongTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THLongTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THLongTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THLongTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~4D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.LongTensor");
THLongTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.LongTensor");
THLongTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_LongTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
long arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THLongTensor *arg11 = NULL;
int arg11_idx = 0;
long arg12 = 0;
long arg13 = 1;
THLongTensor *arg14 = NULL;
THLongTensor *arg15 = NULL;
long arg16 = 1;
long arg17 = 1;
long arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THLongTensor *arg21 = NULL;
int arg21_idx = 0;
long arg22 = 0;
long arg23 = 1;
THLongTensor *arg24 = NULL;
THLongTensor *arg25 = NULL;
long arg26 = 1;
long arg27 = 1;
long arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THLongTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THLongTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THLongTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THLongTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~4D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.LongTensor");
THLongTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.LongTensor");
THLongTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_LongTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_LongTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_LongTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
long arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (long)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor | long", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = labs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_LongTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_zero(arg1);
return 1;
}

static int m_torch_LongTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_LongTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_LongTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_LongTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THLongTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_LongTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THLongTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_LongTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
long arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* index LongTensor LongTensor | *LongTensor* index LongTensor long", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THLongTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_LongTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor LongTensor", type_buf);
}
arg3 = THLongTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_LongTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor LongTensor", type_buf);
}
arg3 = THLongTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_LongTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 1;
THLongTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long | *LongTensor* [LongTensor] [long] LongTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_LongTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 1;
THLongTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long | *LongTensor* [LongTensor] [long] LongTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_LongTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
long arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] long long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_LongTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* LongTensor LongTensor [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_LongTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] [long] LongTensor LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_LongTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] [long] LongTensor LongTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_LongTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* LongTensor~2D LongTensor~1D", type_buf);
}
THLongTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THLongTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_LongTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* LongTensor~2D LongTensor~2D", type_buf);
}
THLongTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THLongTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_LongTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* LongTensor~3D LongTensor~3D", type_buf);
}
THLongTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THLongTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_LongTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* LongTensor~1D LongTensor~1D", type_buf);
}
THLongTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THLongTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_LongTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
long arg8 = 0;
THLongTensor *arg9 = NULL;
long arg10 = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor~1D* [LongTensor~1D] [long] LongTensor~2D LongTensor~1D | *LongTensor~1D* long [LongTensor~1D] long LongTensor~2D LongTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
long arg8 = 0;
THLongTensor *arg9 = NULL;
long arg10 = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor~2D* [LongTensor~2D] [long] LongTensor~2D LongTensor~2D | *LongTensor~2D* long [LongTensor~2D] long LongTensor~2D LongTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
long arg8 = 0;
THLongTensor *arg9 = NULL;
long arg10 = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor~2D* [LongTensor~2D] [long] LongTensor~1D LongTensor~1D | *LongTensor~2D* long [LongTensor~2D] long LongTensor~1D LongTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
long arg8 = 0;
THLongTensor *arg9 = NULL;
long arg10 = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor~2D* [LongTensor~2D] [long] LongTensor~3D LongTensor~3D | *LongTensor~2D* long [LongTensor~2D] long LongTensor~3D LongTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 1;
THLongTensor *arg3 = NULL;
long arg4 = 1;
THLongTensor *arg5 = NULL;
THLongTensor *arg6 = NULL;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
long arg8 = 0;
THLongTensor *arg9 = NULL;
long arg10 = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.LongTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.LongTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.LongTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (long)lua_tonumber(L, 2);
arg10 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor~3D* [LongTensor~3D] [long] LongTensor~3D LongTensor~3D | *LongTensor~3D* long [LongTensor~3D] long LongTensor~3D LongTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor", type_buf);
}
arg2 = THLongTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_LongTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
THLongTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_LongTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
THLongTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_LongTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THLongTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_LongTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
long arg2 = 0;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THLongTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor | [*LongTensor*] [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THLongTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_LongTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
arg4 = THLongTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [LongTensor] LongTensor | [*LongTensor*] [LongTensor] long", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_LongTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
arg4 = THLongTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [LongTensor] LongTensor | [*LongTensor*] [LongTensor] long", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THLongTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_LongTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
long arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: LongTensor", type_buf);
}
arg2 = THLongTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_LongTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_LongTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
long arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* long long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_LongTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_randperm(arg1,arg2,arg3);

THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_LongTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_LongTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THLongTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_LongTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_LongTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_LongTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THLongTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg2_idx = 1;
arg1 = THLongTensor_new();
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THLongTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THLongTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [*LongTensor*] LongTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THLongTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_LongTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_LongTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
long arg4 = -2;
THLongTensor *arg5 = NULL;
int arg5_idx = 0;
THLongTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THLongTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THLongTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.LongTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THLongTensor**)THAlloc(arg6_size * sizeof(THLongTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.LongTensor")))
    luaL_error(L, "expected LongTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor LongTensor [index] | [*LongTensor*] {LongTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.LongTensor");
THLongTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_LongTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THLongTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THLongTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *LongTensor* [Generator] long long | *LongTensor* [Generator] long | *LongTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THLongTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THLongTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_LongTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *LongTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_LongTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THLongTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *LongTensor* [Generator] [double] | *LongTensor* [Generator] FloatTensor | *LongTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THLongTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
THLongTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor | [*LongTensor*] LongTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THLongTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.LongTensor");
{int hasdims = arg4->nDimension > 1;
THLongTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THLongTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_LongTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THLongTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_LongTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
long arg11 = 0;
long arg12 = 1;
THLongTensor *arg13 = NULL;
THLongTensor *arg14 = NULL;
long arg15 = 1;
long arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THLongTensor *arg19 = NULL;
int arg19_idx = 0;
long arg20 = 0;
long arg21 = 1;
THLongTensor *arg22 = NULL;
THLongTensor *arg23 = NULL;
long arg24 = 1;
long arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THLongTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THLongTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THLongTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THLongTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~2D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.LongTensor");
THLongTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.LongTensor");
THLongTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_LongTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
long arg11 = 0;
long arg12 = 1;
THLongTensor *arg13 = NULL;
THLongTensor *arg14 = NULL;
long arg15 = 1;
long arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THLongTensor *arg19 = NULL;
int arg19_idx = 0;
long arg20 = 0;
long arg21 = 1;
THLongTensor *arg22 = NULL;
THLongTensor *arg23 = NULL;
long arg24 = 1;
long arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THLongTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THLongTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THLongTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THLongTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~2D LongTensor~2D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~3D LongTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.LongTensor");
THLongTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.LongTensor");
THLongTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_LongTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
long arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THLongTensor *arg11 = NULL;
int arg11_idx = 0;
long arg12 = 0;
long arg13 = 1;
THLongTensor *arg14 = NULL;
THLongTensor *arg15 = NULL;
long arg16 = 1;
long arg17 = 1;
long arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THLongTensor *arg21 = NULL;
int arg21_idx = 0;
long arg22 = 0;
long arg23 = 1;
THLongTensor *arg24 = NULL;
THLongTensor *arg25 = NULL;
long arg26 = 1;
long arg27 = 1;
long arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THLongTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THLongTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THLongTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THLongTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~4D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.LongTensor");
THLongTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.LongTensor");
THLongTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_LongTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 1;
THLongTensor *arg4 = NULL;
THLongTensor *arg5 = NULL;
long arg6 = 1;
long arg7 = 1;
long arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THLongTensor *arg11 = NULL;
int arg11_idx = 0;
long arg12 = 0;
long arg13 = 1;
THLongTensor *arg14 = NULL;
THLongTensor *arg15 = NULL;
long arg16 = 1;
long arg17 = 1;
long arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THLongTensor *arg21 = NULL;
int arg21_idx = 0;
long arg22 = 0;
long arg23 = 1;
THLongTensor *arg24 = NULL;
THLongTensor *arg25 = NULL;
long arg26 = 1;
long arg27 = 1;
long arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THLongTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THLongTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THLongTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THLongTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THLongTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THLongTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.LongTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.LongTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor~3D LongTensor~3D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~4D [(V|F)] | [*LongTensor*] LongTensor~4D LongTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.LongTensor");
THLongTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.LongTensor");
THLongTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_LongTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THLongTensor *arg5 = NULL;
long arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THLongTensor *arg8 = NULL;
THLongTensor *arg9 = NULL;
THLongTensor *arg10 = NULL;
int arg10_idx = 0;
THLongTensor *arg11 = NULL;
THLongTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (long)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.LongTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] LongTensor long | *LongTensor* LongTensor long | [*ByteTensor*] LongTensor LongTensor | *LongTensor* LongTensor LongTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THLongTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THLongTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THLongTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THLongTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_LongTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THLongTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_LongTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
long arg3 = 0;
long arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (long)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [LongTensor] | long", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THLongTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = labs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static const struct luaL_Reg m_torch_LongTensorMath__ [] = {
{"zero", m_torch_LongTensor_zero},
{"fill", m_torch_LongTensor_fill},
{"zeros", m_torch_LongTensor_zeros},
{"ones", m_torch_LongTensor_ones},
{"reshape", m_torch_LongTensor_reshape},
{"gather", m_torch_LongTensor_gather},
{"scatter", m_torch_LongTensor_scatter},
{"dot", m_torch_LongTensor_dot},
{"equal", m_torch_LongTensor_equal},
{"add", m_torch_LongTensor_add},
{"csub", m_torch_LongTensor_csub},
{"mul", m_torch_LongTensor_mul},
{"div", m_torch_LongTensor_div},
{"lshift", m_torch_LongTensor_lshift},
{"rshift", m_torch_LongTensor_rshift},
{"fmod", m_torch_LongTensor_fmod},
{"remainder", m_torch_LongTensor_remainder},
{"bitand", m_torch_LongTensor_bitand},
{"bitor", m_torch_LongTensor_bitor},
{"bitxor", m_torch_LongTensor_bitxor},
{"mod", m_torch_LongTensor_mod},
{"clamp", m_torch_LongTensor_clamp},
{"match", m_torch_LongTensor_match},
{"cmul", m_torch_LongTensor_cmul},
{"cpow", m_torch_LongTensor_cpow},
{"cdiv", m_torch_LongTensor_cdiv},
{"clshift", m_torch_LongTensor_clshift},
{"crshift", m_torch_LongTensor_crshift},
{"cfmod", m_torch_LongTensor_cfmod},
{"cremainder", m_torch_LongTensor_cremainder},
{"cbitand", m_torch_LongTensor_cbitand},
{"cbitor", m_torch_LongTensor_cbitor},
{"cbitxor", m_torch_LongTensor_cbitxor},
{"cmod", m_torch_LongTensor_cmod},
{"addcmul", m_torch_LongTensor_addcmul},
{"addcdiv", m_torch_LongTensor_addcdiv},
{"mv", m_torch_LongTensor_mv},
{"mm", m_torch_LongTensor_mm},
{"bmm", m_torch_LongTensor_bmm},
{"ger", m_torch_LongTensor_ger},
{"addmv", m_torch_LongTensor_addmv},
{"addmm", m_torch_LongTensor_addmm},
{"addr", m_torch_LongTensor_addr},
{"addbmm", m_torch_LongTensor_addbmm},
{"baddbmm", m_torch_LongTensor_baddbmm},
{"numel", m_torch_LongTensor_numel},
{"cumsum", m_torch_LongTensor_cumsum},
{"cumprod", m_torch_LongTensor_cumprod},
{"sum", m_torch_LongTensor_sum},
{"prod", m_torch_LongTensor_prod},
{"min", m_torch_LongTensor_min},
{"max", m_torch_LongTensor_max},
{"cmin", m_torch_LongTensor_cmin},
{"cmax", m_torch_LongTensor_cmax},
{"trace", m_torch_LongTensor_trace},
{"cross", m_torch_LongTensor_cross},
{"diag", m_torch_LongTensor_diag},
{"eye", m_torch_LongTensor_eye},
{"range", m_torch_LongTensor_range},
{"randperm", m_torch_LongTensor_randperm},
{"sort", m_torch_LongTensor_sort},
{"topk", m_torch_LongTensor_topk},
{"kthvalue", m_torch_LongTensor_kthvalue},
{"mode", m_torch_LongTensor_mode},
{"median", m_torch_LongTensor_median},
{"tril", m_torch_LongTensor_tril},
{"triu", m_torch_LongTensor_triu},
{"cat", m_torch_LongTensor_cat},
{"random", m_torch_LongTensor_random},
{"geometric", m_torch_LongTensor_geometric},
{"bernoulli", m_torch_LongTensor_bernoulli},
{"squeeze", m_torch_LongTensor_squeeze},
{"sign", m_torch_LongTensor_sign},
{"conv2", m_torch_LongTensor_conv2},
{"xcorr2", m_torch_LongTensor_xcorr2},
{"conv3", m_torch_LongTensor_conv3},
{"xcorr3", m_torch_LongTensor_xcorr3},
{"lt", m_torch_LongTensor_lt},
{"gt", m_torch_LongTensor_gt},
{"le", m_torch_LongTensor_le},
{"ge", m_torch_LongTensor_ge},
{"eq", m_torch_LongTensor_eq},
{"ne", m_torch_LongTensor_ne},
{"nonzero", m_torch_LongTensor_nonzero},
{"abs", m_torch_LongTensor_abs},
{NULL, NULL}
};

static const struct luaL_Reg torch_LongTensorMath__ [] = {
{"zero", torch_LongTensor_zero},
{"fill", torch_LongTensor_fill},
{"zeros", torch_LongTensor_zeros},
{"ones", torch_LongTensor_ones},
{"reshape", torch_LongTensor_reshape},
{"gather", torch_LongTensor_gather},
{"scatter", torch_LongTensor_scatter},
{"dot", torch_LongTensor_dot},
{"equal", torch_LongTensor_equal},
{"add", torch_LongTensor_add},
{"csub", torch_LongTensor_csub},
{"mul", torch_LongTensor_mul},
{"div", torch_LongTensor_div},
{"lshift", torch_LongTensor_lshift},
{"rshift", torch_LongTensor_rshift},
{"fmod", torch_LongTensor_fmod},
{"remainder", torch_LongTensor_remainder},
{"bitand", torch_LongTensor_bitand},
{"bitor", torch_LongTensor_bitor},
{"bitxor", torch_LongTensor_bitxor},
{"mod", torch_LongTensor_mod},
{"clamp", torch_LongTensor_clamp},
{"match", torch_LongTensor_match},
{"cmul", torch_LongTensor_cmul},
{"cpow", torch_LongTensor_cpow},
{"cdiv", torch_LongTensor_cdiv},
{"clshift", torch_LongTensor_clshift},
{"crshift", torch_LongTensor_crshift},
{"cfmod", torch_LongTensor_cfmod},
{"cremainder", torch_LongTensor_cremainder},
{"cbitand", torch_LongTensor_cbitand},
{"cbitor", torch_LongTensor_cbitor},
{"cbitxor", torch_LongTensor_cbitxor},
{"cmod", torch_LongTensor_cmod},
{"addcmul", torch_LongTensor_addcmul},
{"addcdiv", torch_LongTensor_addcdiv},
{"mv", torch_LongTensor_mv},
{"mm", torch_LongTensor_mm},
{"bmm", torch_LongTensor_bmm},
{"ger", torch_LongTensor_ger},
{"addmv", torch_LongTensor_addmv},
{"addmm", torch_LongTensor_addmm},
{"addr", torch_LongTensor_addr},
{"addbmm", torch_LongTensor_addbmm},
{"baddbmm", torch_LongTensor_baddbmm},
{"numel", torch_LongTensor_numel},
{"cumsum", torch_LongTensor_cumsum},
{"cumprod", torch_LongTensor_cumprod},
{"sum", torch_LongTensor_sum},
{"prod", torch_LongTensor_prod},
{"min", torch_LongTensor_min},
{"max", torch_LongTensor_max},
{"cmin", torch_LongTensor_cmin},
{"cmax", torch_LongTensor_cmax},
{"trace", torch_LongTensor_trace},
{"cross", torch_LongTensor_cross},
{"diag", torch_LongTensor_diag},
{"eye", torch_LongTensor_eye},
{"range", torch_LongTensor_range},
{"randperm", torch_LongTensor_randperm},
{"sort", torch_LongTensor_sort},
{"topk", torch_LongTensor_topk},
{"kthvalue", torch_LongTensor_kthvalue},
{"mode", torch_LongTensor_mode},
{"median", torch_LongTensor_median},
{"tril", torch_LongTensor_tril},
{"triu", torch_LongTensor_triu},
{"cat", torch_LongTensor_cat},
{"random", torch_LongTensor_random},
{"geometric", torch_LongTensor_geometric},
{"bernoulli", torch_LongTensor_bernoulli},
{"squeeze", torch_LongTensor_squeeze},
{"sign", torch_LongTensor_sign},
{"conv2", torch_LongTensor_conv2},
{"xcorr2", torch_LongTensor_xcorr2},
{"conv3", torch_LongTensor_conv3},
{"xcorr3", torch_LongTensor_xcorr3},
{"lt", torch_LongTensor_lt},
{"gt", torch_LongTensor_gt},
{"le", torch_LongTensor_le},
{"ge", torch_LongTensor_ge},
{"eq", torch_LongTensor_eq},
{"ne", torch_LongTensor_ne},
{"nonzero", torch_LongTensor_nonzero},
{"abs", torch_LongTensor_abs},
{NULL, NULL}
};

static void torch_LongTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.LongTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_LongTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_LongTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_FloatTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_zero(arg1);
return 1;
}

static int torch_FloatTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_fill(arg1,arg2);
return 1;
}

static int torch_FloatTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_FloatTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_FloatTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_FloatTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THFloatTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_FloatTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
float arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* index LongTensor FloatTensor | *FloatTensor* index LongTensor float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_FloatTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor", type_buf);
}
arg3 = THFloatTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_FloatTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor", type_buf);
}
arg3 = THFloatTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_FloatTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
THFloatTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float | [*FloatTensor*] FloatTensor [float] FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_FloatTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
THFloatTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float | [*FloatTensor*] FloatTensor [float] FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_FloatTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_FloatTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor [float]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_FloatTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [float] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_FloatTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [float] FloatTensor FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_FloatTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THFloatTensor_new();
THFloatTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~1D", type_buf);
}
THFloatTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THFloatTensor_new();
THFloatTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~2D", type_buf);
}
THFloatTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THFloatTensor_new();
THFloatTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~3D FloatTensor~3D", type_buf);
}
THFloatTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THFloatTensor_new();
THFloatTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~1D FloatTensor~1D", type_buf);
}
THFloatTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [float] FloatTensor~1D [float] FloatTensor~2D FloatTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [float] FloatTensor~2D [float] FloatTensor~2D FloatTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [float] FloatTensor~2D [float] FloatTensor~1D FloatTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [float] FloatTensor~2D [float] FloatTensor~3D FloatTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [float] FloatTensor~3D [float] FloatTensor~3D FloatTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_FloatTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor", type_buf);
}
arg2 = THFloatTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_FloatTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_FloatTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_FloatTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] [*LongTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THFloatTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_FloatTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] [*LongTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THFloatTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_FloatTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor | [*FloatTensor*] FloatTensor float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_FloatTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor | [*FloatTensor*] FloatTensor float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_FloatTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
double arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor", type_buf);
}
arg2 = THFloatTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_FloatTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_FloatTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
double arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] double double [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_FloatTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THFloatTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_randperm(arg1,arg2,arg3);

THFloatTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_FloatTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_FloatTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THFloatTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_FloatTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_FloatTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_FloatTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_FloatTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_FloatTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
long arg4 = -2;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THFloatTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THFloatTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor [index] | [*FloatTensor*] {FloatTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
THFloatTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THFloatTensor_random2__(THFloatTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(float, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THFloatTensor_random1__(THFloatTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(float, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_FloatTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THFloatTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THFloatTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *FloatTensor* [Generator] long long | *FloatTensor* [Generator] long | *FloatTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THFloatTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THFloatTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_FloatTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *FloatTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_FloatTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *FloatTensor* [Generator] [double] | *FloatTensor* [Generator] FloatTensor | *FloatTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THFloatTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
{int hasdims = arg4->nDimension > 1;
THFloatTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THFloatTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_FloatTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sign(arg1,arg2);
return 1;
}

static int torch_FloatTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
float arg11 = 0;
float arg12 = 1;
THFloatTensor *arg13 = NULL;
THFloatTensor *arg14 = NULL;
float arg15 = 1;
float arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THFloatTensor *arg19 = NULL;
int arg19_idx = 0;
float arg20 = 0;
float arg21 = 1;
THFloatTensor *arg22 = NULL;
THFloatTensor *arg23 = NULL;
float arg24 = 1;
float arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~2D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.FloatTensor");
THFloatTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.FloatTensor");
THFloatTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_FloatTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
float arg11 = 0;
float arg12 = 1;
THFloatTensor *arg13 = NULL;
THFloatTensor *arg14 = NULL;
float arg15 = 1;
float arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THFloatTensor *arg19 = NULL;
int arg19_idx = 0;
float arg20 = 0;
float arg21 = 1;
THFloatTensor *arg22 = NULL;
THFloatTensor *arg23 = NULL;
float arg24 = 1;
float arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~2D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.FloatTensor");
THFloatTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.FloatTensor");
THFloatTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_FloatTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
float arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THFloatTensor *arg11 = NULL;
int arg11_idx = 0;
float arg12 = 0;
float arg13 = 1;
THFloatTensor *arg14 = NULL;
THFloatTensor *arg15 = NULL;
float arg16 = 1;
float arg17 = 1;
float arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THFloatTensor *arg21 = NULL;
int arg21_idx = 0;
float arg22 = 0;
float arg23 = 1;
THFloatTensor *arg24 = NULL;
THFloatTensor *arg25 = NULL;
float arg26 = 1;
float arg27 = 1;
float arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~4D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.FloatTensor");
THFloatTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.FloatTensor");
THFloatTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_FloatTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
float arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THFloatTensor *arg11 = NULL;
int arg11_idx = 0;
float arg12 = 0;
float arg13 = 1;
THFloatTensor *arg14 = NULL;
THFloatTensor *arg15 = NULL;
float arg16 = 1;
float arg17 = 1;
float arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THFloatTensor *arg21 = NULL;
int arg21_idx = 0;
float arg22 = 0;
float arg23 = 1;
THFloatTensor *arg24 = NULL;
THFloatTensor *arg25 = NULL;
float arg26 = 1;
float arg27 = 1;
float arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~4D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.FloatTensor");
THFloatTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.FloatTensor");
THFloatTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_FloatTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_FloatTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THFloatTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_FloatTensor_mean(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_meanall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_mean(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_mean(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "mean");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.mean() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_var(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_varall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_var(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_var(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "var");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.var() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_std(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_stdall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_std(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_std(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "std");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.std() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_histc(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_histc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_histc(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "histc");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.histc() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_bhistc(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_bhistc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_bhistc(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "bhistc");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.bhistc() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_norm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 2;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
long arg7 = 0;
int arg8 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg7 = (long)lua_tonumber(L, 3)-1;
arg4 = THFloatTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
arg7 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor [float] | [*FloatTensor*] FloatTensor float index", type_buf);
}
if(argset == 1)
{
arg3 = THFloatTensor_normall(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_norm(arg4,arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_norm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "norm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.norm() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_renorm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
long arg4 = 0;
float arg5 = 0;
if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (float)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = (float)lua_tonumber(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = (float)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float index float", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_renorm(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_renorm(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "renorm");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.renorm() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_dist(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
float arg3 = 2;
double arg4 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor [float]", type_buf);
}
arg4 = THFloatTensor_dist(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}

static int torch_dist(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "dist");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.dist() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_linspace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 0;
long arg4 = 100;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg3 = (float)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] float float [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_linspace(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_linspace(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "linspace");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.linspace() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_logspace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 0;
long arg4 = 100;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (float)lua_tonumber(L, 1);
arg3 = (float)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] float float [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_logspace(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_logspace(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "logspace");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.logspace() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_log(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_log(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_log(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "log");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.log() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_log1p(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_log1p(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log1p(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_log1p(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "log1p");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.log1p() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_exp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_exp(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = exp(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_exp(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "exp");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.exp() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_cos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_cos(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cos");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cos() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_acos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_acos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = acos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_acos(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "acos");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.acos() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_cosh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cosh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cosh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_cosh(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cosh");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cosh() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_sin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_sin(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sin");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sin() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_asin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_asin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = asin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_asin(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "asin");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.asin() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_sinh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sinh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sinh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_sinh(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sinh");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sinh() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_tan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_tan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_tan(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "tan");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.tan() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_atan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_atan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = atan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_atan(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "atan");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.atan() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_tanh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_tanh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tanh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_tanh(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "tanh");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.tanh() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_sqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_sqrt(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sqrt");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sqrt() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_round(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_round(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = round(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_round(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "round");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.round() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_ceil(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_ceil(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = ceil(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_ceil(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ceil");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ceil() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_floor(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_floor(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = floor(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_floor(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "floor");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.floor() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_trunc(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_trunc(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = trunc(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_trunc(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "trunc");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.trunc() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = fabs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_FloatTensor_frac(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_frac(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_frac(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_frac(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "frac");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.frac() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_rsqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_rsqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_rsqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_rsqrt(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "rsqrt");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.rsqrt() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_sigmoid(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_sigmoid(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_sigmoid(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_sigmoid(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "sigmoid");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.sigmoid() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_neg(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_neg(arg1,arg2);
return 1;
}

static int torch_neg(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "neg");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.neg() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_cinv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cinv(arg1,arg2);
return 1;
}

static int torch_cinv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cinv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cinv() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_lerp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 0;
float arg5 = 0;
float arg6 = 0;
float arg7 = 0;
float arg8 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (float)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 4);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5 = (float)lua_tonumber(L, 1);
arg6 = (float)lua_tonumber(L, 2);
arg7 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor float | float float float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_lerp(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
arg8 = TH_lerp(arg5,arg6,arg7);
lua_pushnumber(L, (lua_Number)arg8);
return 1;
}
return 0;
}

static int torch_lerp(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "lerp");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.lerp() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_atan2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 0;
float arg5 = 0;
float arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4 = (float)lua_tonumber(L, 1);
arg5 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor | float float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_atan2(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
arg6 = atan2(arg4,arg5);
lua_pushnumber(L, (lua_Number)arg6);
return 1;
}
return 0;
}

static int torch_atan2(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "atan2");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.atan2() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_pow(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
float arg5 = 0;
THFloatTensor *arg6 = NULL;
float arg7 = 0;
float arg8 = 0;
float arg9 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg5 = (float)lua_tonumber(L, 1);
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = (float)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 3;
arg7 = (float)lua_tonumber(L, 1);
arg8 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor float | [*FloatTensor*] float FloatTensor | float float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_pow(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_tpow(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
arg9 = pow(arg7,arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
return 0;
}

static int torch_pow(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "pow");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.pow() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_rand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg3 = torch_checklongargs(L, 1);
arg1 = THFloatTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_rand(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_rand(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "rand");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.rand() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_randn(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg3 = torch_checklongargs(L, 1);
arg1 = THFloatTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_randn(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_randn(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "randn");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.randn() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_multinomial(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THFloatTensor *arg3 = NULL;
int arg4 = 0;
int arg5 = 0;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (int)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [Generator] FloatTensor int [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THFloatTensor_multinomial(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_multinomial(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "multinomial");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.multinomial() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_uniform(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_uniform(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_uniform(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_uniform(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "uniform");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.uniform() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_normal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_normal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_normal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_normal(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "normal");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.normal() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_cauchy(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_cauchy(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_cauchy(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_cauchy(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "cauchy");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.cauchy() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_logNormal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 1;
double arg3 = 2;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 1;
float arg8 = 2;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_logNormal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_logNormal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_logNormal(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "logNormal");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.logNormal() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_exponential(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
float arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *FloatTensor* [Generator] float", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_exponential(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_exponential(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_exponential(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "exponential");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.exponential() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_gesv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THFloatTensor *arg7 = NULL;
THFloatTensor *arg8 = NULL;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg5 = THFloatTensor_new();
arg6 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor FloatTensor | FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_gesv(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
THFloatTensor_gesv(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_gesv(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "gesv");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.gesv() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_gels(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THFloatTensor *arg7 = NULL;
THFloatTensor *arg8 = NULL;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg5 = THFloatTensor_new();
arg6 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor FloatTensor | FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_gels(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
THFloatTensor_gels(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_gels(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "gels");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.gels() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_trtrs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'U';
const char *arg6 = NULL;
char arg6_default = 'N';
const char *arg7 = NULL;
char arg7_default = 'N';
THFloatTensor *arg8 = NULL;
int arg8_idx = 0;
THFloatTensor *arg9 = NULL;
int arg9_idx = 0;
THFloatTensor *arg10 = NULL;
THFloatTensor *arg11 = NULL;
const char *arg12 = NULL;
char arg12_default = 'U';
const char *arg13 = NULL;
char arg13_default = 'N';
const char *arg14 = NULL;
char arg14_default = 'N';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg6 = &arg6_default;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg6 = &arg6_default;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg7 = &arg7_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg7 = lua_tostring(L, 5)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg6 = &arg6_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg7 = lua_tostring(L, 6)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg6 = &arg6_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
&& (arg7 = lua_tostring(L, 6)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
&& (arg7 = lua_tostring(L, 7)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg12 = &arg12_default;
arg13 = &arg13_default;
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg13 = &arg13_default;
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg13 = lua_tostring(L, 3)) && (*arg13 == 'N' || *arg13 == 'T')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg12 = &arg12_default;
arg14 = &arg14_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg13 = lua_tostring(L, 4)) && (*arg13 == 'N' || *arg13 == 'T')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg14 = lua_tostring(L, 3)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg12 = &arg12_default;
arg13 = &arg13_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg14 = lua_tostring(L, 4)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg13 = &arg13_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg13 = lua_tostring(L, 3)) && (*arg13 == 'N' || *arg13 == 'T')
&& (arg14 = lua_tostring(L, 4)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
arg12 = &arg12_default;
}
else if(narg == 5
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg13 = lua_tostring(L, 4)) && (*arg13 == 'N' || *arg13 == 'T')
&& (arg14 = lua_tostring(L, 5)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THFloatTensor_new();
arg9 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor FloatTensor [(U|L)] [(N|T)] [(N|U)] | FloatTensor FloatTensor [(U|L)] [(N|T)] [(N|U)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_trtrs(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
return 2;
}
else if(argset == 2)
{
if(arg8_idx)
lua_pushvalue(L, arg8_idx);
else
luaT_pushudata(L, arg8, "torch.FloatTensor");
if(arg9_idx)
lua_pushvalue(L, arg9_idx);
else
luaT_pushudata(L, arg9, "torch.FloatTensor");
THFloatTensor_trtrs(arg8,arg9,arg10,arg11,arg12,arg13,arg14);
return 2;
}
return 0;
}

static int torch_trtrs(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "trtrs");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.trtrs() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_symeig(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'N';
const char *arg5 = NULL;
char arg5_default = 'U';
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
const char *arg9 = NULL;
char arg9_default = 'N';
const char *arg10 = NULL;
char arg10_default = 'U';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
arg5 = &arg5_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 4)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'N' || *arg9 == 'V')
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg10 = lua_tostring(L, 2)) && (*arg10 == 'U' || *arg10 == 'L')
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'N' || *arg9 == 'V')
&& (arg10 = lua_tostring(L, 3)) && (*arg10 == 'U' || *arg10 == 'L')
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor [(N|V)] [(U|L)] | FloatTensor [(N|V)] [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_syev(arg1,arg2,arg3,arg4,arg5);
return 2;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.FloatTensor");
THFloatTensor_syev(arg6,arg7,arg8,arg9,arg10);
return 2;
}
return 0;
}

static int torch_symeig(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "symeig");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.symeig() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_eig(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'N';
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THFloatTensor *arg7 = NULL;
const char *arg8 = NULL;
char arg8_default = 'N';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5 = THFloatTensor_new();
arg6 = THFloatTensor_new();
arg8 = &arg8_default;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg8 = lua_tostring(L, 2)) && (*arg8 == 'N' || *arg8 == 'V')
)
{
argset = 2;
arg5 = THFloatTensor_new();
arg6 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor [(N|V)] | FloatTensor [(N|V)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_geev(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
THFloatTensor_geev(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_eig(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "eig");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.eig() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_svd(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'S';
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
int arg8_idx = 0;
THFloatTensor *arg9 = NULL;
const char *arg10 = NULL;
char arg10_default = 'S';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg3_idx = 3;
arg5 = &arg5_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'A' || *arg5 == 'S')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg3_idx = 3;
}
else if(narg == 1
&& (arg9 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
arg8 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg9 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg10 = lua_tostring(L, 2)) && (*arg10 == 'A' || *arg10 == 'S')
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THFloatTensor_new();
arg8 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* *FloatTensor* FloatTensor [(A|S)] | FloatTensor [(A|S)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
lua_pushvalue(L, arg3_idx);
THFloatTensor_gesvd(arg1,arg2,arg3,arg4,arg5);
return 3;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.FloatTensor");
if(arg8_idx)
lua_pushvalue(L, arg8_idx);
else
luaT_pushudata(L, arg8, "torch.FloatTensor");
THFloatTensor_gesvd(arg6,arg7,arg8,arg9,arg10);
return 3;
}
return 0;
}

static int torch_svd(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "svd");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.svd() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_inverse(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg3 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor | FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_getri(arg1,arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_getri(arg3,arg4);
return 1;
}
return 0;
}

static int torch_inverse(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "inverse");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.inverse() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_potrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
const char *arg3 = NULL;
char arg3_default = 'U';
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
const char *arg6 = NULL;
char arg6_default = 'U';
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg3 = &arg3_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = lua_tostring(L, 3)) && (*arg3 == 'U' || *arg3 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
arg6 = &arg6_default;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = lua_tostring(L, 2)) && (*arg6 == 'U' || *arg6 == 'L')
)
{
argset = 2;
arg4 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor [(U|L)] | FloatTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_potrf(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_potrf(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_potrf(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "potrf");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.potrf() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_potrs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'U';
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
const char *arg8 = NULL;
char arg8_default = 'U';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg6 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg5 = THFloatTensor_new();
arg8 = &arg8_default;
}
else if(narg == 3
&& (arg6 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'U' || *arg8 == 'L')
)
{
argset = 2;
arg5 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor FloatTensor [(U|L)] | FloatTensor FloatTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_potrs(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
THFloatTensor_potrs(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_potrs(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "potrs");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.potrs() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_potri(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
const char *arg3 = NULL;
char arg3_default = 'U';
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
const char *arg6 = NULL;
char arg6_default = 'U';
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg3 = &arg3_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = lua_tostring(L, 3)) && (*arg3 == 'U' || *arg3 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
arg6 = &arg6_default;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = lua_tostring(L, 2)) && (*arg6 == 'U' || *arg6 == 'L')
)
{
argset = 2;
arg4 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor [(U|L)] | FloatTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_potri(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_potri(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_potri(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "potri");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.potri() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_pstrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'U';
float arg5 = -1;
THFloatTensor *arg6 = NULL;
int arg6_idx = 0;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
const char *arg9 = NULL;
char arg9_default = 'U';
float arg10 = -1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = (float)lua_tonumber(L, 4);
arg4 = &arg4_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
&& lua_isnumber(L, 5)
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = (float)lua_tonumber(L, 5);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'U' || *arg9 == 'L')
)
{
argset = 2;
arg6 = THFloatTensor_new();
arg7 = THIntTensor_new();
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg10 = (float)lua_tonumber(L, 2);
arg6 = THFloatTensor_new();
arg7 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'U' || *arg9 == 'L')
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg10 = (float)lua_tonumber(L, 3);
arg6 = THFloatTensor_new();
arg7 = THIntTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *IntTensor* FloatTensor [(U|L)] [float] | FloatTensor [(U|L)] [float]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_pstrf(arg1,arg2,arg3,arg4,arg5);
return 2;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.FloatTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.IntTensor");
THFloatTensor_pstrf(arg6,arg7,arg8,arg9,arg10);
return 2;
}
return 0;
}

static int torch_pstrf(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "pstrf");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.pstrf() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_qr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg6 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
arg5 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor | FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_qr(arg1,arg2,arg3);
return 2;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
THFloatTensor_qr(arg4,arg5,arg6);
return 2;
}
return 0;
}

static int torch_qr(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "qr");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.qr() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_geqrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg6 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
arg5 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* *FloatTensor* FloatTensor | FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THFloatTensor_geqrf(arg1,arg2,arg3);
return 2;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
THFloatTensor_geqrf(arg4,arg5,arg6);
return 2;
}
return 0;
}

static int torch_geqrf(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "geqrf");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.geqrf() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_orgqr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg4 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor FloatTensor | FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_orgqr(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_orgqr(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_orgqr(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "orgqr");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.orgqr() function", tname);

  return lua_gettop(L);
}

static int torch_FloatTensor_ormqr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'L';
const char *arg6 = NULL;
char arg6_default = 'N';
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
const char *arg11 = NULL;
char arg11_default = 'L';
const char *arg12 = NULL;
char arg12_default = 'N';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg5 = &arg5_default;
arg6 = &arg6_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'L' || *arg5 == 'R')
)
{
argset = 1;
arg1_idx = 1;
arg6 = &arg6_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg5 = &arg5_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'L' || *arg5 == 'R')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg7 = THFloatTensor_new();
arg11 = &arg11_default;
arg12 = &arg12_default;
}
else if(narg == 4
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg11 = lua_tostring(L, 4)) && (*arg11 == 'L' || *arg11 == 'R')
)
{
argset = 2;
arg7 = THFloatTensor_new();
arg12 = &arg12_default;
}
else if(narg == 4
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg12 = lua_tostring(L, 4)) && (*arg12 == 'N' || *arg12 == 'T')
)
{
argset = 2;
arg7 = THFloatTensor_new();
arg11 = &arg11_default;
}
else if(narg == 5
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg11 = lua_tostring(L, 4)) && (*arg11 == 'L' || *arg11 == 'R')
&& (arg12 = lua_tostring(L, 5)) && (*arg12 == 'N' || *arg12 == 'T')
)
{
argset = 2;
arg7 = THFloatTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor FloatTensor FloatTensor [(L|R)] [(N|T)] | FloatTensor FloatTensor FloatTensor [(L|R)] [(N|T)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_ormqr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.FloatTensor");
THFloatTensor_ormqr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_ormqr(lua_State *L)
{
  int narg = lua_gettop(L);
  const void *tname;
  if(narg >= 1 && (tname = torch_istensortype(L, luaT_typename(L, 1)))) /* first argument is tensor? */
  {
  }
  else if(narg >= 2 && (tname = torch_istensortype(L, luaT_typename(L, 2)))) /* second? */
  {
  }
  else if(narg >= 1 && (tname = torch_istensorarray(L, 1))) /* torch table argument? */
  {
  }
  else if(narg >= 1 && lua_type(L, narg) == LUA_TSTRING
	  && (tname = torch_istensortype(L, lua_tostring(L, narg)))) /* do we have a valid tensor type string then? */
  {
    lua_remove(L, -2);
  }
  else if(!(tname = torch_istensortype(L, torch_getdefaulttensortype(L))))
    luaL_error(L, "internal error: the default tensor type does not seem to be an actual tensor");

  lua_pushstring(L, "ormqr");
  lua_rawget(L, -2);
  if(lua_isfunction(L, -1))
  {
    lua_insert(L, 1);
    lua_pop(L, 2); /* the two tables we put on the stack above */
    lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
  }
  else
    return luaL_error(L, "%s does not implement the torch.ormqr() function", tname);

  return lua_gettop(L);
}

static int m_torch_FloatTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_zero(arg1);
return 1;
}

static int m_torch_FloatTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_FloatTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_FloatTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_FloatTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_FloatTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THFloatTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
float arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* index LongTensor FloatTensor | *FloatTensor* index LongTensor float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor", type_buf);
}
arg3 = THFloatTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_FloatTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor", type_buf);
}
arg3 = THFloatTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_FloatTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
THFloatTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float | *FloatTensor* [FloatTensor] [float] FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
THFloatTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float | *FloatTensor* [FloatTensor] [float] FloatTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg4 = (float)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor FloatTensor [float]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] [float] FloatTensor FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_FloatTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] [float] FloatTensor FloatTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_FloatTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor~2D FloatTensor~1D", type_buf);
}
THFloatTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THFloatTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_FloatTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor~2D FloatTensor~2D", type_buf);
}
THFloatTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THFloatTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_FloatTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor~3D FloatTensor~3D", type_buf);
}
THFloatTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THFloatTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_FloatTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* FloatTensor~1D FloatTensor~1D", type_buf);
}
THFloatTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THFloatTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_FloatTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
float arg8 = 0;
THFloatTensor *arg9 = NULL;
float arg10 = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor~1D* [FloatTensor~1D] [float] FloatTensor~2D FloatTensor~1D | *FloatTensor~1D* float [FloatTensor~1D] float FloatTensor~2D FloatTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
float arg8 = 0;
THFloatTensor *arg9 = NULL;
float arg10 = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor~2D* [FloatTensor~2D] [float] FloatTensor~2D FloatTensor~2D | *FloatTensor~2D* float [FloatTensor~2D] float FloatTensor~2D FloatTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
float arg8 = 0;
THFloatTensor *arg9 = NULL;
float arg10 = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor~2D* [FloatTensor~2D] [float] FloatTensor~1D FloatTensor~1D | *FloatTensor~2D* float [FloatTensor~2D] float FloatTensor~1D FloatTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
float arg8 = 0;
THFloatTensor *arg9 = NULL;
float arg10 = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor~2D* [FloatTensor~2D] [float] FloatTensor~3D FloatTensor~3D | *FloatTensor~2D* float [FloatTensor~2D] float FloatTensor~3D FloatTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 1;
THFloatTensor *arg3 = NULL;
float arg4 = 1;
THFloatTensor *arg5 = NULL;
THFloatTensor *arg6 = NULL;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
float arg8 = 0;
THFloatTensor *arg9 = NULL;
float arg10 = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.FloatTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.FloatTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.FloatTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
arg10 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor~3D* [FloatTensor~3D] [float] FloatTensor~3D FloatTensor~3D | *FloatTensor~3D* float [FloatTensor~3D] float FloatTensor~3D FloatTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor", type_buf);
}
arg2 = THFloatTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_FloatTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] [*LongTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THFloatTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_FloatTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] [*LongTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THFloatTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_FloatTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 1);
arg4 = THFloatTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [FloatTensor] FloatTensor | [*FloatTensor*] [FloatTensor] float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 1);
arg4 = THFloatTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg4 = THFloatTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [FloatTensor] FloatTensor | [*FloatTensor*] [FloatTensor] float", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
double arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor", type_buf);
}
arg2 = THFloatTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_FloatTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
double arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* double double [double]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_randperm(arg1,arg2,arg3);

THFloatTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_FloatTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_FloatTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THFloatTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_FloatTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_FloatTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_FloatTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THFloatTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg2_idx = 1;
arg1 = THFloatTensor_new();
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THFloatTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THFloatTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] [*LongTensor*] FloatTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THFloatTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_FloatTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_FloatTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
long arg4 = -2;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THFloatTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THFloatTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THFloatTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THFloatTensor**)THAlloc(arg6_size * sizeof(THFloatTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.FloatTensor")))
    luaL_error(L, "expected FloatTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor FloatTensor [index] | [*FloatTensor*] {FloatTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.FloatTensor");
THFloatTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THFloatTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THFloatTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *FloatTensor* [Generator] long long | *FloatTensor* [Generator] long | *FloatTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THFloatTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THFloatTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *FloatTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THFloatTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *FloatTensor* [Generator] [double] | *FloatTensor* [Generator] FloatTensor | *FloatTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THFloatTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THFloatTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
{int hasdims = arg4->nDimension > 1;
THFloatTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THFloatTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_FloatTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_FloatTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
float arg11 = 0;
float arg12 = 1;
THFloatTensor *arg13 = NULL;
THFloatTensor *arg14 = NULL;
float arg15 = 1;
float arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THFloatTensor *arg19 = NULL;
int arg19_idx = 0;
float arg20 = 0;
float arg21 = 1;
THFloatTensor *arg22 = NULL;
THFloatTensor *arg23 = NULL;
float arg24 = 1;
float arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~2D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.FloatTensor");
THFloatTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.FloatTensor");
THFloatTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
float arg11 = 0;
float arg12 = 1;
THFloatTensor *arg13 = NULL;
THFloatTensor *arg14 = NULL;
float arg15 = 1;
float arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THFloatTensor *arg19 = NULL;
int arg19_idx = 0;
float arg20 = 0;
float arg21 = 1;
THFloatTensor *arg22 = NULL;
THFloatTensor *arg23 = NULL;
float arg24 = 1;
float arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THFloatTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THFloatTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~2D FloatTensor~2D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~3D FloatTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.FloatTensor");
THFloatTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.FloatTensor");
THFloatTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
float arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THFloatTensor *arg11 = NULL;
int arg11_idx = 0;
float arg12 = 0;
float arg13 = 1;
THFloatTensor *arg14 = NULL;
THFloatTensor *arg15 = NULL;
float arg16 = 1;
float arg17 = 1;
float arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THFloatTensor *arg21 = NULL;
int arg21_idx = 0;
float arg22 = 0;
float arg23 = 1;
THFloatTensor *arg24 = NULL;
THFloatTensor *arg25 = NULL;
float arg26 = 1;
float arg27 = 1;
float arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~4D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.FloatTensor");
THFloatTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.FloatTensor");
THFloatTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 1;
THFloatTensor *arg4 = NULL;
THFloatTensor *arg5 = NULL;
float arg6 = 1;
float arg7 = 1;
float arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THFloatTensor *arg11 = NULL;
int arg11_idx = 0;
float arg12 = 0;
float arg13 = 1;
THFloatTensor *arg14 = NULL;
THFloatTensor *arg15 = NULL;
float arg16 = 1;
float arg17 = 1;
float arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THFloatTensor *arg21 = NULL;
int arg21_idx = 0;
float arg22 = 0;
float arg23 = 1;
THFloatTensor *arg24 = NULL;
THFloatTensor *arg25 = NULL;
float arg26 = 1;
float arg27 = 1;
float arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THFloatTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THFloatTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THFloatTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.FloatTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.FloatTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor~3D FloatTensor~3D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~4D [(V|F)] | [*FloatTensor*] FloatTensor~4D FloatTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.FloatTensor");
THFloatTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.FloatTensor");
THFloatTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THFloatTensor *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THFloatTensor *arg10 = NULL;
int arg10_idx = 0;
THFloatTensor *arg11 = NULL;
THFloatTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (float)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] FloatTensor float | *FloatTensor* FloatTensor float | [*ByteTensor*] FloatTensor FloatTensor | *FloatTensor* FloatTensor FloatTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THFloatTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THFloatTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THFloatTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] FloatTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THFloatTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_FloatTensor_mean(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_meanall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_mean(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_var(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_varall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_var(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_std(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
double arg2 = 0;
THFloatTensor *arg3 = NULL;
int arg3_idx = 0;
THFloatTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THFloatTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THFloatTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor | [*FloatTensor*] FloatTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THFloatTensor_stdall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.FloatTensor");
THFloatTensor_std(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_histc(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_histc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_FloatTensor_bhistc(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1 = THFloatTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THFloatTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THFloatTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THFloatTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*FloatTensor*] FloatTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.FloatTensor");
THFloatTensor_bhistc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_FloatTensor_norm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
float arg2 = 2;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THFloatTensor *arg5 = NULL;
float arg6 = 0;
long arg7 = 0;
int arg8 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (float)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg6 = (float)lua_tonumber(L, 2);
arg7 = (long)lua_tonumber(L, 3)-1;
arg4 = THFloatTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
arg7 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor [float] | [*FloatTensor*] FloatTensor float index", type_buf);
}
if(argset == 1)
{
arg3 = THFloatTensor_normall(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.FloatTensor");
THFloatTensor_norm(arg4,arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_renorm(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
long arg4 = 0;
float arg5 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = (float)lua_tonumber(L, 4);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = (float)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float index float", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_renorm(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_FloatTensor_dist(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
THFloatTensor *arg2 = NULL;
float arg3 = 2;
double arg4 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
arg3 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: FloatTensor FloatTensor [float]", type_buf);
}
arg4 = THFloatTensor_dist(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}

static int m_torch_FloatTensor_linspace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 0;
long arg4 = 100;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* float float [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_linspace(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_logspace(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
float arg2 = 0;
float arg3 = 0;
long arg4 = 100;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (float)lua_tonumber(L, 2);
arg3 = (float)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* float float [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_logspace(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_FloatTensor_log(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_log(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_log1p(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_log1p(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log1p(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_exp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_exp(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = exp(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_cos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_cos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_acos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_acos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = acos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_cosh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_cosh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cosh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_sin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_sin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_asin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_asin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = asin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_sinh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_sinh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sinh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_tan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_tan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_atan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_atan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = atan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_tanh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_tanh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tanh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_sqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_sqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_round(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_round(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = round(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_ceil(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_ceil(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = ceil(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_floor(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_floor(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = floor(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_trunc(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_trunc(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = trunc(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = fabs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_frac(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_frac(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_frac(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_rsqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_rsqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_rsqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_sigmoid(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
float arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (float)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] | float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_sigmoid(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_sigmoid(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_neg(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_neg(arg1,arg2);
return 1;
}

static int m_torch_FloatTensor_cinv(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_cinv(arg1,arg2);
return 1;
}

static int m_torch_FloatTensor_lerp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 0;
float arg5 = 0;
float arg6 = 0;
float arg7 = 0;
float arg8 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (float)lua_tonumber(L, 4);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5 = (float)lua_tonumber(L, 1);
arg6 = (float)lua_tonumber(L, 2);
arg7 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor float | float float float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_lerp(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
arg8 = TH_lerp(arg5,arg6,arg7);
lua_pushnumber(L, (lua_Number)arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_atan2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
THFloatTensor *arg3 = NULL;
float arg4 = 0;
float arg5 = 0;
float arg6 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4 = (float)lua_tonumber(L, 1);
arg5 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] FloatTensor | float float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_atan2(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
arg6 = atan2(arg4,arg5);
lua_pushnumber(L, (lua_Number)arg6);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_pow(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THFloatTensor *arg2 = NULL;
float arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
float arg5 = 0;
THFloatTensor *arg6 = NULL;
float arg7 = 0;
float arg8 = 0;
float arg9 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg5 = (float)lua_tonumber(L, 2);
arg6 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& (arg6 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = (float)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 3;
arg7 = (float)lua_tonumber(L, 1);
arg8 = (float)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [FloatTensor] float | *FloatTensor* float [FloatTensor] | float float", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THFloatTensor_pow(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_tpow(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
arg9 = pow(arg7,arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_rand(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_rand(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_FloatTensor_randn(lua_State *L)
{
int narg = lua_gettop(L);
THFloatTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *FloatTensor* [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_randn(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_FloatTensor_multinomial(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THFloatTensor *arg3 = NULL;
int arg4 = 0;
int arg5 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.FloatTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.FloatTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [Generator] FloatTensor int [boolean]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THFloatTensor_multinomial(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_FloatTensor_uniform(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_uniform(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_uniform(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_normal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_normal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_normal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_cauchy(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 0;
float arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_cauchy(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_cauchy(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_logNormal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 1;
double arg3 = 2;
double arg4 = 0;
THFloatTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
float arg7 = 1;
float arg8 = 2;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (float)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 2);
arg8 = (float)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (float)lua_tonumber(L, 3);
arg8 = (float)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *FloatTensor* [Generator] [float] [float]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_logNormal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THFloatTensor_logNormal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_FloatTensor_exponential(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THFloatTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
float arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.FloatTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (float)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *FloatTensor* [Generator] float", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_exponential(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THFloatTensor_exponential(arg4,arg5,arg6);
return 1;
}
return 0;
}

static const struct luaL_Reg m_torch_FloatTensorMath__ [] = {
{"zero", m_torch_FloatTensor_zero},
{"fill", m_torch_FloatTensor_fill},
{"zeros", m_torch_FloatTensor_zeros},
{"ones", m_torch_FloatTensor_ones},
{"reshape", m_torch_FloatTensor_reshape},
{"gather", m_torch_FloatTensor_gather},
{"scatter", m_torch_FloatTensor_scatter},
{"dot", m_torch_FloatTensor_dot},
{"equal", m_torch_FloatTensor_equal},
{"add", m_torch_FloatTensor_add},
{"csub", m_torch_FloatTensor_csub},
{"mul", m_torch_FloatTensor_mul},
{"div", m_torch_FloatTensor_div},
{"lshift", m_torch_FloatTensor_lshift},
{"rshift", m_torch_FloatTensor_rshift},
{"fmod", m_torch_FloatTensor_fmod},
{"remainder", m_torch_FloatTensor_remainder},
{"bitand", m_torch_FloatTensor_bitand},
{"bitor", m_torch_FloatTensor_bitor},
{"bitxor", m_torch_FloatTensor_bitxor},
{"mod", m_torch_FloatTensor_mod},
{"clamp", m_torch_FloatTensor_clamp},
{"match", m_torch_FloatTensor_match},
{"cmul", m_torch_FloatTensor_cmul},
{"cpow", m_torch_FloatTensor_cpow},
{"cdiv", m_torch_FloatTensor_cdiv},
{"clshift", m_torch_FloatTensor_clshift},
{"crshift", m_torch_FloatTensor_crshift},
{"cfmod", m_torch_FloatTensor_cfmod},
{"cremainder", m_torch_FloatTensor_cremainder},
{"cbitand", m_torch_FloatTensor_cbitand},
{"cbitor", m_torch_FloatTensor_cbitor},
{"cbitxor", m_torch_FloatTensor_cbitxor},
{"cmod", m_torch_FloatTensor_cmod},
{"addcmul", m_torch_FloatTensor_addcmul},
{"addcdiv", m_torch_FloatTensor_addcdiv},
{"mv", m_torch_FloatTensor_mv},
{"mm", m_torch_FloatTensor_mm},
{"bmm", m_torch_FloatTensor_bmm},
{"ger", m_torch_FloatTensor_ger},
{"addmv", m_torch_FloatTensor_addmv},
{"addmm", m_torch_FloatTensor_addmm},
{"addr", m_torch_FloatTensor_addr},
{"addbmm", m_torch_FloatTensor_addbmm},
{"baddbmm", m_torch_FloatTensor_baddbmm},
{"numel", m_torch_FloatTensor_numel},
{"cumsum", m_torch_FloatTensor_cumsum},
{"cumprod", m_torch_FloatTensor_cumprod},
{"sum", m_torch_FloatTensor_sum},
{"prod", m_torch_FloatTensor_prod},
{"min", m_torch_FloatTensor_min},
{"max", m_torch_FloatTensor_max},
{"cmin", m_torch_FloatTensor_cmin},
{"cmax", m_torch_FloatTensor_cmax},
{"trace", m_torch_FloatTensor_trace},
{"cross", m_torch_FloatTensor_cross},
{"diag", m_torch_FloatTensor_diag},
{"eye", m_torch_FloatTensor_eye},
{"range", m_torch_FloatTensor_range},
{"randperm", m_torch_FloatTensor_randperm},
{"sort", m_torch_FloatTensor_sort},
{"topk", m_torch_FloatTensor_topk},
{"kthvalue", m_torch_FloatTensor_kthvalue},
{"mode", m_torch_FloatTensor_mode},
{"median", m_torch_FloatTensor_median},
{"tril", m_torch_FloatTensor_tril},
{"triu", m_torch_FloatTensor_triu},
{"cat", m_torch_FloatTensor_cat},
{"random", m_torch_FloatTensor_random},
{"geometric", m_torch_FloatTensor_geometric},
{"bernoulli", m_torch_FloatTensor_bernoulli},
{"squeeze", m_torch_FloatTensor_squeeze},
{"sign", m_torch_FloatTensor_sign},
{"conv2", m_torch_FloatTensor_conv2},
{"xcorr2", m_torch_FloatTensor_xcorr2},
{"conv3", m_torch_FloatTensor_conv3},
{"xcorr3", m_torch_FloatTensor_xcorr3},
{"lt", m_torch_FloatTensor_lt},
{"gt", m_torch_FloatTensor_gt},
{"le", m_torch_FloatTensor_le},
{"ge", m_torch_FloatTensor_ge},
{"eq", m_torch_FloatTensor_eq},
{"ne", m_torch_FloatTensor_ne},
{"nonzero", m_torch_FloatTensor_nonzero},
{"mean", m_torch_FloatTensor_mean},
{"var", m_torch_FloatTensor_var},
{"std", m_torch_FloatTensor_std},
{"histc", m_torch_FloatTensor_histc},
{"bhistc", m_torch_FloatTensor_bhistc},
{"norm", m_torch_FloatTensor_norm},
{"renorm", m_torch_FloatTensor_renorm},
{"dist", m_torch_FloatTensor_dist},
{"linspace", m_torch_FloatTensor_linspace},
{"logspace", m_torch_FloatTensor_logspace},
{"log", m_torch_FloatTensor_log},
{"log1p", m_torch_FloatTensor_log1p},
{"exp", m_torch_FloatTensor_exp},
{"cos", m_torch_FloatTensor_cos},
{"acos", m_torch_FloatTensor_acos},
{"cosh", m_torch_FloatTensor_cosh},
{"sin", m_torch_FloatTensor_sin},
{"asin", m_torch_FloatTensor_asin},
{"sinh", m_torch_FloatTensor_sinh},
{"tan", m_torch_FloatTensor_tan},
{"atan", m_torch_FloatTensor_atan},
{"tanh", m_torch_FloatTensor_tanh},
{"sqrt", m_torch_FloatTensor_sqrt},
{"round", m_torch_FloatTensor_round},
{"ceil", m_torch_FloatTensor_ceil},
{"floor", m_torch_FloatTensor_floor},
{"trunc", m_torch_FloatTensor_trunc},
{"abs", m_torch_FloatTensor_abs},
{"frac", m_torch_FloatTensor_frac},
{"rsqrt", m_torch_FloatTensor_rsqrt},
{"sigmoid", m_torch_FloatTensor_sigmoid},
{"neg", m_torch_FloatTensor_neg},
{"cinv", m_torch_FloatTensor_cinv},
{"lerp", m_torch_FloatTensor_lerp},
{"atan2", m_torch_FloatTensor_atan2},
{"pow", m_torch_FloatTensor_pow},
{"rand", m_torch_FloatTensor_rand},
{"randn", m_torch_FloatTensor_randn},
{"multinomial", m_torch_FloatTensor_multinomial},
{"uniform", m_torch_FloatTensor_uniform},
{"normal", m_torch_FloatTensor_normal},
{"cauchy", m_torch_FloatTensor_cauchy},
{"logNormal", m_torch_FloatTensor_logNormal},
{"exponential", m_torch_FloatTensor_exponential},
{NULL, NULL}
};

static const struct luaL_Reg torch_FloatTensorMath__ [] = {
{"zero", torch_FloatTensor_zero},
{"fill", torch_FloatTensor_fill},
{"zeros", torch_FloatTensor_zeros},
{"ones", torch_FloatTensor_ones},
{"reshape", torch_FloatTensor_reshape},
{"gather", torch_FloatTensor_gather},
{"scatter", torch_FloatTensor_scatter},
{"dot", torch_FloatTensor_dot},
{"equal", torch_FloatTensor_equal},
{"add", torch_FloatTensor_add},
{"csub", torch_FloatTensor_csub},
{"mul", torch_FloatTensor_mul},
{"div", torch_FloatTensor_div},
{"lshift", torch_FloatTensor_lshift},
{"rshift", torch_FloatTensor_rshift},
{"fmod", torch_FloatTensor_fmod},
{"remainder", torch_FloatTensor_remainder},
{"bitand", torch_FloatTensor_bitand},
{"bitor", torch_FloatTensor_bitor},
{"bitxor", torch_FloatTensor_bitxor},
{"mod", torch_FloatTensor_mod},
{"clamp", torch_FloatTensor_clamp},
{"match", torch_FloatTensor_match},
{"cmul", torch_FloatTensor_cmul},
{"cpow", torch_FloatTensor_cpow},
{"cdiv", torch_FloatTensor_cdiv},
{"clshift", torch_FloatTensor_clshift},
{"crshift", torch_FloatTensor_crshift},
{"cfmod", torch_FloatTensor_cfmod},
{"cremainder", torch_FloatTensor_cremainder},
{"cbitand", torch_FloatTensor_cbitand},
{"cbitor", torch_FloatTensor_cbitor},
{"cbitxor", torch_FloatTensor_cbitxor},
{"cmod", torch_FloatTensor_cmod},
{"addcmul", torch_FloatTensor_addcmul},
{"addcdiv", torch_FloatTensor_addcdiv},
{"mv", torch_FloatTensor_mv},
{"mm", torch_FloatTensor_mm},
{"bmm", torch_FloatTensor_bmm},
{"ger", torch_FloatTensor_ger},
{"addmv", torch_FloatTensor_addmv},
{"addmm", torch_FloatTensor_addmm},
{"addr", torch_FloatTensor_addr},
{"addbmm", torch_FloatTensor_addbmm},
{"baddbmm", torch_FloatTensor_baddbmm},
{"numel", torch_FloatTensor_numel},
{"cumsum", torch_FloatTensor_cumsum},
{"cumprod", torch_FloatTensor_cumprod},
{"sum", torch_FloatTensor_sum},
{"prod", torch_FloatTensor_prod},
{"min", torch_FloatTensor_min},
{"max", torch_FloatTensor_max},
{"cmin", torch_FloatTensor_cmin},
{"cmax", torch_FloatTensor_cmax},
{"trace", torch_FloatTensor_trace},
{"cross", torch_FloatTensor_cross},
{"diag", torch_FloatTensor_diag},
{"eye", torch_FloatTensor_eye},
{"range", torch_FloatTensor_range},
{"randperm", torch_FloatTensor_randperm},
{"sort", torch_FloatTensor_sort},
{"topk", torch_FloatTensor_topk},
{"kthvalue", torch_FloatTensor_kthvalue},
{"mode", torch_FloatTensor_mode},
{"median", torch_FloatTensor_median},
{"tril", torch_FloatTensor_tril},
{"triu", torch_FloatTensor_triu},
{"cat", torch_FloatTensor_cat},
{"random", torch_FloatTensor_random},
{"geometric", torch_FloatTensor_geometric},
{"bernoulli", torch_FloatTensor_bernoulli},
{"squeeze", torch_FloatTensor_squeeze},
{"sign", torch_FloatTensor_sign},
{"conv2", torch_FloatTensor_conv2},
{"xcorr2", torch_FloatTensor_xcorr2},
{"conv3", torch_FloatTensor_conv3},
{"xcorr3", torch_FloatTensor_xcorr3},
{"lt", torch_FloatTensor_lt},
{"gt", torch_FloatTensor_gt},
{"le", torch_FloatTensor_le},
{"ge", torch_FloatTensor_ge},
{"eq", torch_FloatTensor_eq},
{"ne", torch_FloatTensor_ne},
{"nonzero", torch_FloatTensor_nonzero},
{"mean", torch_FloatTensor_mean},
{"var", torch_FloatTensor_var},
{"std", torch_FloatTensor_std},
{"histc", torch_FloatTensor_histc},
{"bhistc", torch_FloatTensor_bhistc},
{"norm", torch_FloatTensor_norm},
{"renorm", torch_FloatTensor_renorm},
{"dist", torch_FloatTensor_dist},
{"linspace", torch_FloatTensor_linspace},
{"logspace", torch_FloatTensor_logspace},
{"log", torch_FloatTensor_log},
{"log1p", torch_FloatTensor_log1p},
{"exp", torch_FloatTensor_exp},
{"cos", torch_FloatTensor_cos},
{"acos", torch_FloatTensor_acos},
{"cosh", torch_FloatTensor_cosh},
{"sin", torch_FloatTensor_sin},
{"asin", torch_FloatTensor_asin},
{"sinh", torch_FloatTensor_sinh},
{"tan", torch_FloatTensor_tan},
{"atan", torch_FloatTensor_atan},
{"tanh", torch_FloatTensor_tanh},
{"sqrt", torch_FloatTensor_sqrt},
{"round", torch_FloatTensor_round},
{"ceil", torch_FloatTensor_ceil},
{"floor", torch_FloatTensor_floor},
{"trunc", torch_FloatTensor_trunc},
{"abs", torch_FloatTensor_abs},
{"frac", torch_FloatTensor_frac},
{"rsqrt", torch_FloatTensor_rsqrt},
{"sigmoid", torch_FloatTensor_sigmoid},
{"neg", torch_FloatTensor_neg},
{"cinv", torch_FloatTensor_cinv},
{"lerp", torch_FloatTensor_lerp},
{"atan2", torch_FloatTensor_atan2},
{"pow", torch_FloatTensor_pow},
{"rand", torch_FloatTensor_rand},
{"randn", torch_FloatTensor_randn},
{"multinomial", torch_FloatTensor_multinomial},
{"uniform", torch_FloatTensor_uniform},
{"normal", torch_FloatTensor_normal},
{"cauchy", torch_FloatTensor_cauchy},
{"logNormal", torch_FloatTensor_logNormal},
{"exponential", torch_FloatTensor_exponential},
{"gesv", torch_FloatTensor_gesv},
{"gels", torch_FloatTensor_gels},
{"trtrs", torch_FloatTensor_trtrs},
{"symeig", torch_FloatTensor_symeig},
{"eig", torch_FloatTensor_eig},
{"svd", torch_FloatTensor_svd},
{"inverse", torch_FloatTensor_inverse},
{"potrf", torch_FloatTensor_potrf},
{"potrs", torch_FloatTensor_potrs},
{"potri", torch_FloatTensor_potri},
{"pstrf", torch_FloatTensor_pstrf},
{"qr", torch_FloatTensor_qr},
{"geqrf", torch_FloatTensor_geqrf},
{"orgqr", torch_FloatTensor_orgqr},
{"ormqr", torch_FloatTensor_ormqr},
{NULL, NULL}
};

static void torch_FloatTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.FloatTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_FloatTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_FloatTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static const struct luaL_Reg m_torch_HalfTensorMath__ [] = {
{NULL, NULL}
};

static const struct luaL_Reg torch_HalfTensorMath__ [] = {
{NULL, NULL}
};

static void torch_HalfTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.HalfTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_HalfTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_HalfTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static int torch_DoubleTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_zero(arg1);
return 1;
}

static int torch_DoubleTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_fill(arg1,arg2);
return 1;
}

static int torch_DoubleTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_DoubleTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg2 = torch_checklongargs(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int torch_DoubleTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_DoubleTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THDoubleTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
double arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* index LongTensor DoubleTensor | *DoubleTensor* index LongTensor double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor", type_buf);
}
arg3 = THDoubleTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int torch_DoubleTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor", type_buf);
}
arg3 = THDoubleTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int torch_DoubleTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
THDoubleTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double | [*DoubleTensor*] DoubleTensor [double] DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_DoubleTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
THDoubleTensor *arg7 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double | [*DoubleTensor*] DoubleTensor [double] DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_DoubleTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_mul(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_div(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [double] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_DoubleTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [double] DoubleTensor DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_DoubleTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THDoubleTensor_new();
THDoubleTensor_resize1d(arg1, arg5->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~1D", type_buf);
}
THDoubleTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THDoubleTensor_new();
THDoubleTensor_resize2d(arg1, arg5->size[0], arg6->size[1]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~2D", type_buf);
}
THDoubleTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THDoubleTensor_new();
THDoubleTensor_resize3d(arg1, arg5->size[0], arg5->size[1], arg6->size[2]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D", type_buf);
}
THDoubleTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THDoubleTensor_new();
THDoubleTensor_resize2d(arg1, arg5->size[0], arg6->size[0]);
arg3 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~1D DoubleTensor~1D", type_buf);
}
THDoubleTensor_zero(arg1);
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [double] DoubleTensor~1D [double] DoubleTensor~2D DoubleTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [double] DoubleTensor~2D [double] DoubleTensor~2D DoubleTensor~2D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [double] DoubleTensor~2D [double] DoubleTensor~1D DoubleTensor~1D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [double] DoubleTensor~2D [double] DoubleTensor~3D DoubleTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
}
else if(narg == 4
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& lua_isnumber(L, 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [double] DoubleTensor~3D [double] DoubleTensor~3D DoubleTensor~3D", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int torch_DoubleTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor", type_buf);
}
arg2 = THDoubleTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_DoubleTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] [*LongTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THDoubleTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_DoubleTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] [*LongTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THDoubleTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int torch_DoubleTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor | [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor | [*DoubleTensor*] DoubleTensor double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor", type_buf);
}
arg2 = THDoubleTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int torch_DoubleTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_diag(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] long [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_eye(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
double arg4 = 1;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] double double [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
arg3 = (long)lua_tonumber(L, 1);
arg1 = THDoubleTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [Generator] long", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_randperm(arg1,arg2,arg3);

THDoubleTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_DoubleTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_DoubleTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THDoubleTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_DoubleTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_DoubleTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_DoubleTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int torch_DoubleTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_tril(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_triu(arg1,arg2,arg3);
return 1;
}

static int torch_DoubleTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
long arg4 = -2;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor [index] | [*DoubleTensor*] {DoubleTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
THDoubleTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static void THDoubleTensor_random2__(THDoubleTensor *self, THGenerator *gen, long a, long b)
{
  THArgCheck(b >= a, 2, "upper bound must be larger than lower bound");
  TH_TENSOR_APPLY(double, self, *self_data = ((THRandom_random(gen) % (b+1-a)) + a);)
}

static void THDoubleTensor_random1__(THDoubleTensor *self, THGenerator *gen, long b)
{
  THArgCheck(b > 0, 1, "upper bound must be strictly positive");
  TH_TENSOR_APPLY(double, self, *self_data = (THRandom_random(gen) % b + 1);)
}

static int torch_DoubleTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THDoubleTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THDoubleTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *DoubleTensor* [Generator] long long | *DoubleTensor* [Generator] long | *DoubleTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THDoubleTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THDoubleTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int torch_DoubleTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *DoubleTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *DoubleTensor* [Generator] [double] | *DoubleTensor* [Generator] FloatTensor | *DoubleTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THDoubleTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
{int hasdims = arg4->nDimension > 1;
THDoubleTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THDoubleTensor_data(arg3)));}
return 1;
}
return 0;
}

static int torch_DoubleTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sign(arg1,arg2);
return 1;
}

static int torch_DoubleTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
double arg11 = 0;
double arg12 = 1;
THDoubleTensor *arg13 = NULL;
THDoubleTensor *arg14 = NULL;
double arg15 = 1;
double arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THDoubleTensor *arg19 = NULL;
int arg19_idx = 0;
double arg20 = 0;
double arg21 = 1;
THDoubleTensor *arg22 = NULL;
THDoubleTensor *arg23 = NULL;
double arg24 = 1;
double arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~2D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.DoubleTensor");
THDoubleTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.DoubleTensor");
THDoubleTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_DoubleTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
double arg11 = 0;
double arg12 = 1;
THDoubleTensor *arg13 = NULL;
THDoubleTensor *arg14 = NULL;
double arg15 = 1;
double arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THDoubleTensor *arg19 = NULL;
int arg19_idx = 0;
double arg20 = 0;
double arg21 = 1;
THDoubleTensor *arg22 = NULL;
THDoubleTensor *arg23 = NULL;
double arg24 = 1;
double arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~2D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.DoubleTensor");
THDoubleTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.DoubleTensor");
THDoubleTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int torch_DoubleTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
double arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THDoubleTensor *arg11 = NULL;
int arg11_idx = 0;
double arg12 = 0;
double arg13 = 1;
THDoubleTensor *arg14 = NULL;
THDoubleTensor *arg15 = NULL;
double arg16 = 1;
double arg17 = 1;
double arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THDoubleTensor *arg21 = NULL;
int arg21_idx = 0;
double arg22 = 0;
double arg23 = 1;
THDoubleTensor *arg24 = NULL;
THDoubleTensor *arg25 = NULL;
double arg26 = 1;
double arg27 = 1;
double arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~4D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.DoubleTensor");
THDoubleTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.DoubleTensor");
THDoubleTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_DoubleTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
double arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THDoubleTensor *arg11 = NULL;
int arg11_idx = 0;
double arg12 = 0;
double arg13 = 1;
THDoubleTensor *arg14 = NULL;
THDoubleTensor *arg15 = NULL;
double arg16 = 1;
double arg17 = 1;
double arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THDoubleTensor *arg21 = NULL;
int arg21_idx = 0;
double arg22 = 0;
double arg23 = 1;
THDoubleTensor *arg24 = NULL;
THDoubleTensor *arg25 = NULL;
double arg26 = 1;
double arg27 = 1;
double arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~4D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.DoubleTensor");
THDoubleTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.DoubleTensor");
THDoubleTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int torch_DoubleTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int torch_DoubleTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THDoubleTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_DoubleTensor_mean(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_meanall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_mean(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_var(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_varall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_var(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_DoubleTensor_std(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_stdall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_std(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int torch_DoubleTensor_histc(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_histc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_DoubleTensor_bhistc(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_bhistc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_DoubleTensor_norm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 2;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
long arg7 = 0;
int arg8 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg7 = (long)lua_tonumber(L, 3)-1;
arg4 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
arg7 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor [double] | [*DoubleTensor*] DoubleTensor double index", type_buf);
}
if(argset == 1)
{
arg3 = THDoubleTensor_normall(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_norm(arg4,arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_renorm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
long arg4 = 0;
double arg5 = 0;
if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (double)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = (double)lua_tonumber(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double index double", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_renorm(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int torch_DoubleTensor_dist(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
double arg3 = 2;
double arg4 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor [double]", type_buf);
}
arg4 = THDoubleTensor_dist(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}

static int torch_DoubleTensor_linspace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
long arg4 = 100;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] double double [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_linspace(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_logspace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
long arg4 = 100;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] double double [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_logspace(arg1,arg2,arg3,arg4);
return 1;
}

static int torch_DoubleTensor_log(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_log(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_log1p(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_log1p(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log1p(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_exp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_exp(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = exp(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_cos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_acos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_acos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = acos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_cosh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cosh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cosh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_sin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_asin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_asin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = asin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_sinh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sinh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sinh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_tan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_tan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_atan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_atan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = atan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_tanh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_tanh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tanh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_sqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_round(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_round(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = round(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_ceil(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_ceil(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = ceil(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_floor(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_floor(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = floor(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_trunc(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_trunc(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = trunc(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = fabs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_frac(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_frac(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_frac(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_rsqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_rsqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_rsqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_sigmoid(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_sigmoid(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_sigmoid(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_neg(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_neg(arg1,arg2);
return 1;
}

static int torch_DoubleTensor_cinv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cinv(arg1,arg2);
return 1;
}

static int torch_DoubleTensor_lerp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 0;
double arg5 = 0;
double arg6 = 0;
double arg7 = 0;
double arg8 = 0;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5 = (double)lua_tonumber(L, 1);
arg6 = (double)lua_tonumber(L, 2);
arg7 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor double | double double double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_lerp(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
arg8 = TH_lerp(arg5,arg6,arg7);
lua_pushnumber(L, (lua_Number)arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_atan2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 0;
double arg5 = 0;
double arg6 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4 = (double)lua_tonumber(L, 1);
arg5 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor | double double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_atan2(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
arg6 = atan2(arg4,arg5);
lua_pushnumber(L, (lua_Number)arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_pow(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
double arg5 = 0;
THDoubleTensor *arg6 = NULL;
double arg7 = 0;
double arg8 = 0;
double arg9 = 0;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg5 = (double)lua_tonumber(L, 1);
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 3;
arg7 = (double)lua_tonumber(L, 1);
arg8 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor double | [*DoubleTensor*] double DoubleTensor | double double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_pow(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_tpow(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
arg9 = pow(arg7,arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
return 0;
}

static int torch_DoubleTensor_rand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg3 = torch_checklongargs(L, 1);
arg1 = THDoubleTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_rand(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_DoubleTensor_randn(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 1
&& torch_islongargs(L, 1)
)
{
arg3 = torch_checklongargs(L, 1);
arg1 = THDoubleTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_randn(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int torch_DoubleTensor_multinomial(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
int arg4 = 0;
int arg5 = 0;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg1 = THLongTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (int)lua_tonumber(L, 3);
arg1 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (int)lua_tonumber(L, 2);
arg5 = lua_toboolean(L, 3);
arg1 = THLongTensor_new();
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, torch_Generator))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
arg1 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] [Generator] DoubleTensor int [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THDoubleTensor_multinomial(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int torch_DoubleTensor_uniform(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_uniform(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_uniform(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_normal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_normal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_normal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_cauchy(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_cauchy(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_cauchy(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_logNormal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 1;
double arg3 = 2;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 1;
double arg8 = 2;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_logNormal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_logNormal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_exponential(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *DoubleTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_exponential(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_exponential(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_gesv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THDoubleTensor *arg7 = NULL;
THDoubleTensor *arg8 = NULL;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg5 = THDoubleTensor_new();
arg6 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor DoubleTensor | DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_gesv(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
THDoubleTensor_gesv(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_DoubleTensor_gels(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THDoubleTensor *arg7 = NULL;
THDoubleTensor *arg8 = NULL;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg5 = THDoubleTensor_new();
arg6 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor DoubleTensor | DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_gels(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
THDoubleTensor_gels(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_DoubleTensor_trtrs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'U';
const char *arg6 = NULL;
char arg6_default = 'N';
const char *arg7 = NULL;
char arg7_default = 'N';
THDoubleTensor *arg8 = NULL;
int arg8_idx = 0;
THDoubleTensor *arg9 = NULL;
int arg9_idx = 0;
THDoubleTensor *arg10 = NULL;
THDoubleTensor *arg11 = NULL;
const char *arg12 = NULL;
char arg12_default = 'U';
const char *arg13 = NULL;
char arg13_default = 'N';
const char *arg14 = NULL;
char arg14_default = 'N';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg6 = &arg6_default;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg6 = &arg6_default;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg7 = &arg7_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg7 = &arg7_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg7 = lua_tostring(L, 5)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
arg6 = &arg6_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg7 = lua_tostring(L, 6)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg6 = &arg6_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
&& (arg7 = lua_tostring(L, 6)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
&& (arg7 = lua_tostring(L, 7)) && (*arg7 == 'N' || *arg7 == 'U')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg12 = &arg12_default;
arg13 = &arg13_default;
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg13 = &arg13_default;
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg13 = lua_tostring(L, 3)) && (*arg13 == 'N' || *arg13 == 'T')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg12 = &arg12_default;
arg14 = &arg14_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg13 = lua_tostring(L, 4)) && (*arg13 == 'N' || *arg13 == 'T')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg14 = &arg14_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg14 = lua_tostring(L, 3)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg12 = &arg12_default;
arg13 = &arg13_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg14 = lua_tostring(L, 4)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg13 = &arg13_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg13 = lua_tostring(L, 3)) && (*arg13 == 'N' || *arg13 == 'T')
&& (arg14 = lua_tostring(L, 4)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
arg12 = &arg12_default;
}
else if(narg == 5
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = lua_tostring(L, 3)) && (*arg12 == 'U' || *arg12 == 'L')
&& (arg13 = lua_tostring(L, 4)) && (*arg13 == 'N' || *arg13 == 'T')
&& (arg14 = lua_tostring(L, 5)) && (*arg14 == 'N' || *arg14 == 'U')
)
{
argset = 2;
arg8 = THDoubleTensor_new();
arg9 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor DoubleTensor [(U|L)] [(N|T)] [(N|U)] | DoubleTensor DoubleTensor [(U|L)] [(N|T)] [(N|U)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_trtrs(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
return 2;
}
else if(argset == 2)
{
if(arg8_idx)
lua_pushvalue(L, arg8_idx);
else
luaT_pushudata(L, arg8, "torch.DoubleTensor");
if(arg9_idx)
lua_pushvalue(L, arg9_idx);
else
luaT_pushudata(L, arg9, "torch.DoubleTensor");
THDoubleTensor_trtrs(arg8,arg9,arg10,arg11,arg12,arg13,arg14);
return 2;
}
return 0;
}

static int torch_DoubleTensor_symeig(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'N';
const char *arg5 = NULL;
char arg5_default = 'U';
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
const char *arg9 = NULL;
char arg9_default = 'N';
const char *arg10 = NULL;
char arg10_default = 'U';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
arg5 = &arg5_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = &arg5_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 4)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'U' || *arg5 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'N' || *arg9 == 'V')
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg10 = lua_tostring(L, 2)) && (*arg10 == 'U' || *arg10 == 'L')
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'N' || *arg9 == 'V')
&& (arg10 = lua_tostring(L, 3)) && (*arg10 == 'U' || *arg10 == 'L')
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor [(N|V)] [(U|L)] | DoubleTensor [(N|V)] [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_syev(arg1,arg2,arg3,arg4,arg5);
return 2;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.DoubleTensor");
THDoubleTensor_syev(arg6,arg7,arg8,arg9,arg10);
return 2;
}
return 0;
}

static int torch_DoubleTensor_eig(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'N';
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THDoubleTensor *arg7 = NULL;
const char *arg8 = NULL;
char arg8_default = 'N';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'N' || *arg4 == 'V')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5 = THDoubleTensor_new();
arg6 = THDoubleTensor_new();
arg8 = &arg8_default;
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg8 = lua_tostring(L, 2)) && (*arg8 == 'N' || *arg8 == 'V')
)
{
argset = 2;
arg5 = THDoubleTensor_new();
arg6 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor [(N|V)] | DoubleTensor [(N|V)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_geev(arg1,arg2,arg3,arg4);
return 2;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
THDoubleTensor_geev(arg5,arg6,arg7,arg8);
return 2;
}
return 0;
}

static int torch_DoubleTensor_svd(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'S';
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
int arg8_idx = 0;
THDoubleTensor *arg9 = NULL;
const char *arg10 = NULL;
char arg10_default = 'S';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg3_idx = 3;
arg5 = &arg5_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'A' || *arg5 == 'S')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg3_idx = 3;
}
else if(narg == 1
&& (arg9 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
arg8 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg9 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg10 = lua_tostring(L, 2)) && (*arg10 == 'A' || *arg10 == 'S')
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THDoubleTensor_new();
arg8 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* *DoubleTensor* DoubleTensor [(A|S)] | DoubleTensor [(A|S)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
lua_pushvalue(L, arg3_idx);
THDoubleTensor_gesvd(arg1,arg2,arg3,arg4,arg5);
return 3;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.DoubleTensor");
if(arg8_idx)
lua_pushvalue(L, arg8_idx);
else
luaT_pushudata(L, arg8, "torch.DoubleTensor");
THDoubleTensor_gesvd(arg6,arg7,arg8,arg9,arg10);
return 3;
}
return 0;
}

static int torch_DoubleTensor_inverse(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg3 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor | DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_getri(arg1,arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_getri(arg3,arg4);
return 1;
}
return 0;
}

static int torch_DoubleTensor_potrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
const char *arg3 = NULL;
char arg3_default = 'U';
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
const char *arg6 = NULL;
char arg6_default = 'U';
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg3 = &arg3_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = lua_tostring(L, 3)) && (*arg3 == 'U' || *arg3 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
arg6 = &arg6_default;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = lua_tostring(L, 2)) && (*arg6 == 'U' || *arg6 == 'L')
)
{
argset = 2;
arg4 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor [(U|L)] | DoubleTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_potrf(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_potrf(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_potrs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'U';
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
const char *arg8 = NULL;
char arg8_default = 'U';
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg6 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg5 = THDoubleTensor_new();
arg8 = &arg8_default;
}
else if(narg == 3
&& (arg6 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'U' || *arg8 == 'L')
)
{
argset = 2;
arg5 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor DoubleTensor [(U|L)] | DoubleTensor DoubleTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_potrs(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
THDoubleTensor_potrs(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int torch_DoubleTensor_potri(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
const char *arg3 = NULL;
char arg3_default = 'U';
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
const char *arg6 = NULL;
char arg6_default = 'U';
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg3 = &arg3_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = lua_tostring(L, 3)) && (*arg3 == 'U' || *arg3 == 'L')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
arg6 = &arg6_default;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = lua_tostring(L, 2)) && (*arg6 == 'U' || *arg6 == 'L')
)
{
argset = 2;
arg4 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor [(U|L)] | DoubleTensor [(U|L)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_potri(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_potri(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_pstrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THIntTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
const char *arg4 = NULL;
char arg4_default = 'U';
double arg5 = -1;
THDoubleTensor *arg6 = NULL;
int arg6_idx = 0;
THIntTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
const char *arg9 = NULL;
char arg9_default = 'U';
double arg10 = -1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg4 = &arg4_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = (double)lua_tonumber(L, 4);
arg4 = &arg4_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.IntTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = lua_tostring(L, 4)) && (*arg4 == 'U' || *arg4 == 'L')
&& lua_isnumber(L, 5)
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
arg5 = (double)lua_tonumber(L, 5);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'U' || *arg9 == 'L')
)
{
argset = 2;
arg6 = THDoubleTensor_new();
arg7 = THIntTensor_new();
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg10 = (double)lua_tonumber(L, 2);
arg6 = THDoubleTensor_new();
arg7 = THIntTensor_new();
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = lua_tostring(L, 2)) && (*arg9 == 'U' || *arg9 == 'L')
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg10 = (double)lua_tonumber(L, 3);
arg6 = THDoubleTensor_new();
arg7 = THIntTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *IntTensor* DoubleTensor [(U|L)] [double] | DoubleTensor [(U|L)] [double]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_pstrf(arg1,arg2,arg3,arg4,arg5);
return 2;
}
else if(argset == 2)
{
if(arg6_idx)
lua_pushvalue(L, arg6_idx);
else
luaT_pushudata(L, arg6, "torch.DoubleTensor");
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.IntTensor");
THDoubleTensor_pstrf(arg6,arg7,arg8,arg9,arg10);
return 2;
}
return 0;
}

static int torch_DoubleTensor_qr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg6 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
arg5 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor | DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_qr(arg1,arg2,arg3);
return 2;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
THDoubleTensor_qr(arg4,arg5,arg6);
return 2;
}
return 0;
}

static int torch_DoubleTensor_geqrf(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2_idx = 2;
}
else if(narg == 1
&& (arg6 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
arg5 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* *DoubleTensor* DoubleTensor | DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
lua_pushvalue(L, arg2_idx);
THDoubleTensor_geqrf(arg1,arg2,arg3);
return 2;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
THDoubleTensor_geqrf(arg4,arg5,arg6);
return 2;
}
return 0;
}

static int torch_DoubleTensor_orgqr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg4 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor DoubleTensor | DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_orgqr(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_orgqr(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int torch_DoubleTensor_ormqr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
const char *arg5 = NULL;
char arg5_default = 'L';
const char *arg6 = NULL;
char arg6_default = 'N';
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
const char *arg11 = NULL;
char arg11_default = 'L';
const char *arg12 = NULL;
char arg12_default = 'N';
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg5 = &arg5_default;
arg6 = &arg6_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'L' || *arg5 == 'R')
)
{
argset = 1;
arg1_idx = 1;
arg6 = &arg6_default;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg6 = lua_tostring(L, 5)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
arg5 = &arg5_default;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = lua_tostring(L, 5)) && (*arg5 == 'L' || *arg5 == 'R')
&& (arg6 = lua_tostring(L, 6)) && (*arg6 == 'N' || *arg6 == 'T')
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg7 = THDoubleTensor_new();
arg11 = &arg11_default;
arg12 = &arg12_default;
}
else if(narg == 4
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg11 = lua_tostring(L, 4)) && (*arg11 == 'L' || *arg11 == 'R')
)
{
argset = 2;
arg7 = THDoubleTensor_new();
arg12 = &arg12_default;
}
else if(narg == 4
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg12 = lua_tostring(L, 4)) && (*arg12 == 'N' || *arg12 == 'T')
)
{
argset = 2;
arg7 = THDoubleTensor_new();
arg11 = &arg11_default;
}
else if(narg == 5
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg10 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg11 = lua_tostring(L, 4)) && (*arg11 == 'L' || *arg11 == 'R')
&& (arg12 = lua_tostring(L, 5)) && (*arg12 == 'N' || *arg12 == 'T')
)
{
argset = 2;
arg7 = THDoubleTensor_new();
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor DoubleTensor DoubleTensor [(L|R)] [(N|T)] | DoubleTensor DoubleTensor DoubleTensor [(L|R)] [(N|T)]", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_ormqr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.DoubleTensor");
THDoubleTensor_ormqr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_zero(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor*", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_zero(arg1);
return 1;
}

static int m_torch_DoubleTensor_fill(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_fill(arg1,arg2);
return 1;
}

static int m_torch_DoubleTensor_zeros(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_zeros(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_DoubleTensor_ones(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongStorage *arg2 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg2 = torch_checklongargs(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_ones(arg1,arg2);
THLongStorage_free(arg2);
return 1;
}

static int m_torch_DoubleTensor_reshape(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg3 = torch_checklongargs(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor (LongStorage | dim1 [dim2...])", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_reshape(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_DoubleTensor_gather(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
THLongTensor *arg4 = NULL;
if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.LongTensor"))
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
THLongStorage* arg1_size = THLongTensor_newSizeOf(arg4);
THDoubleTensor_resize(arg1, arg1_size, NULL);
THLongStorage_free(arg1_size);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.LongTensor"))
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor index LongTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_gather(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_scatter(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
THLongTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
long arg6 = 0;
THLongTensor *arg7 = NULL;
double arg8 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg3 = luaT_toudata(L, 3, "torch.LongTensor"))
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2)-1;
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.LongTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg6 = (long)lua_tonumber(L, 2)-1;
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* index LongTensor DoubleTensor | *DoubleTensor* index LongTensor double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_scatter(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_scatterFill(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_dot(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor", type_buf);
}
arg3 = THDoubleTensor_dot(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}

static int m_torch_DoubleTensor_equal(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor", type_buf);
}
arg3 = THDoubleTensor_equal(arg1,arg2);
lua_pushboolean(L, arg3);
return 1;
}

static int m_torch_DoubleTensor_add(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
THDoubleTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double | *DoubleTensor* [DoubleTensor] [double] DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_add(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_cadd(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_csub(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
THDoubleTensor *arg7 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg7 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg7 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double | *DoubleTensor* [DoubleTensor] [double] DoubleTensor", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sub(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_csub(arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_mul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_mul(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_div(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_div(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_lshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_lshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_rshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_rshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_fmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_remainder(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_remainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_bitand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_bitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_bitor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_bitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_bitxor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_bitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_mod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_fmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_clamp(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_clamp(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_match(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor DoubleTensor [double]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_match(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_cmul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cmul(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cpow(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cpow(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cdiv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cdiv(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_clshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_clshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_crshift(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_crshift(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cfmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cremainder(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cremainder(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cbitand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cbitand(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cbitor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cbitor(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cbitxor(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cbitxor(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cmod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cfmod(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_addcmul(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] [double] DoubleTensor DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addcmul(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_DoubleTensor_addcdiv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg4 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& (arg4 = luaT_toudata(L, 4, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 5, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] [double] DoubleTensor DoubleTensor", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addcdiv(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_DoubleTensor_mv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor~2D DoubleTensor~1D", type_buf);
}
THDoubleTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_DoubleTensor_mm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor~2D DoubleTensor~2D", type_buf);
}
THDoubleTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_DoubleTensor_bmm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor~3D DoubleTensor~3D", type_buf);
}
THDoubleTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THDoubleTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_DoubleTensor_ger(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
arg1_idx = 1;
arg3 = arg1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* DoubleTensor~1D DoubleTensor~1D", type_buf);
}
THDoubleTensor_zero(arg1);
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}

static int m_torch_DoubleTensor_addmv(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
double arg8 = 0;
THDoubleTensor *arg9 = NULL;
double arg10 = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 1)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 1)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 1)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 1)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg9->nDimension == 1)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor~1D* [DoubleTensor~1D] [double] DoubleTensor~2D DoubleTensor~1D | *DoubleTensor~1D* double [DoubleTensor~1D] double DoubleTensor~2D DoubleTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addmv(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_addmv(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_addmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
double arg8 = 0;
THDoubleTensor *arg9 = NULL;
double arg10 = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg11->nDimension == 2)
&& (arg12 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg12->nDimension == 2)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor~2D* [DoubleTensor~2D] [double] DoubleTensor~2D DoubleTensor~2D | *DoubleTensor~2D* double [DoubleTensor~2D] double DoubleTensor~2D DoubleTensor~2D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_addmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_addr(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
double arg8 = 0;
THDoubleTensor *arg9 = NULL;
double arg10 = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 1)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 1)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg11->nDimension == 1)
&& (arg12 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg12->nDimension == 1)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor~2D* [DoubleTensor~2D] [double] DoubleTensor~1D DoubleTensor~1D | *DoubleTensor~2D* double [DoubleTensor~2D] double DoubleTensor~1D DoubleTensor~1D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addr(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_addr(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_addbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
double arg8 = 0;
THDoubleTensor *arg9 = NULL;
double arg10 = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 2)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 2)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 2)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg9->nDimension == 2)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor~2D* [DoubleTensor~2D] [double] DoubleTensor~3D DoubleTensor~3D | *DoubleTensor~2D* double [DoubleTensor~2D] double DoubleTensor~3D DoubleTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_addbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_addbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_baddbmm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 1;
THDoubleTensor *arg3 = NULL;
double arg4 = 1;
THDoubleTensor *arg5 = NULL;
THDoubleTensor *arg6 = NULL;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
double arg8 = 0;
THDoubleTensor *arg9 = NULL;
double arg10 = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 2);
arg3 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg1->nDimension == 3)
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg3->nDimension == 3)
&& lua_isnumber(L, 3)
&& (arg5 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg6 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg6->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 5
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& (arg11 = luaT_toudata(L, 4, "torch.DoubleTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 3);
arg9 = arg7;
}
else if(narg == 6
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg7->nDimension == 3)
&& lua_isnumber(L, 2)
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg9->nDimension == 3)
&& lua_isnumber(L, 4)
&& (arg11 = luaT_toudata(L, 5, "torch.DoubleTensor")) && (arg11->nDimension == 3)
&& (arg12 = luaT_toudata(L, 6, "torch.DoubleTensor")) && (arg12->nDimension == 3)
)
{
argset = 2;
arg7_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
arg10 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor~3D* [DoubleTensor~3D] [double] DoubleTensor~3D DoubleTensor~3D | *DoubleTensor~3D* double [DoubleTensor~3D] double DoubleTensor~3D DoubleTensor~3D", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_baddbmm(arg1,arg2,arg3,arg4,arg5,arg6);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_baddbmm(arg7,arg8,arg9,arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_numel(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
ptrdiff_t arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor", type_buf);
}
arg2 = THDoubleTensor_numel(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_DoubleTensor_cumsum(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cumsum(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cumprod(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cumprod(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_sum(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_sumall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_sum(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_prod(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_prodall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_prod(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_min(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] [*LongTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_minall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THDoubleTensor_min(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_DoubleTensor_max(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THLongTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
long arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg4 = THLongTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (long)lua_tonumber(L, 3)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg4_idx = 2;
arg6 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] [*LongTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_maxall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.LongTensor");
THDoubleTensor_max(arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg4, arg4, 1);
return 2;
}
return 0;
}

static int m_torch_DoubleTensor_cmin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 1);
arg4 = THDoubleTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [DoubleTensor] DoubleTensor | [*DoubleTensor*] [DoubleTensor] double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cmin(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_cminValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_cmax(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 1);
arg4 = THDoubleTensor_new();
arg5 = arg4;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
arg5 = arg4;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg4 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [DoubleTensor] DoubleTensor | [*DoubleTensor*] [DoubleTensor] double", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cmax(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_cmaxValue(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_trace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor", type_buf);
}
arg2 = THDoubleTensor_trace(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}

static int m_torch_DoubleTensor_cross(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
long arg4 = -1;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cross(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_diag(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_diag(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_eye(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
long arg2 = 0;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* long [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_eye(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_range(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
double arg4 = 1;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* double double [double]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_range(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_randperm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
long arg3 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [Generator] long", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_randperm(arg1,arg2,arg3);

THDoubleTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_DoubleTensor_sort(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg5 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg5 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg5 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = lua_toboolean(L, 4);
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg5 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_sort(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_DoubleTensor_topk(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 1;
long arg5 = 0;
int arg6 = 0;
int arg7 = 0;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg6 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
)
{
arg7 = lua_toboolean(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg1_idx = 1;
arg7 = lua_toboolean(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
)
{
arg2_idx = 1;
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg7 = lua_toboolean(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg7 = lua_toboolean(L, 6);
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isboolean(L, 2)
&& lua_isboolean(L, 3)
)
{
arg6 = lua_toboolean(L, 2);
arg7 = lua_toboolean(L, 3);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg1_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg2_idx = 1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
&& lua_isboolean(L, 4)
)
{
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg7 = lua_toboolean(L, 4);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg1_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg2 = THLongTensor_new();
}
else if(narg == 5
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg2_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
}
else if(narg == 5
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
&& lua_isboolean(L, 5)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
arg7 = lua_toboolean(L, 5);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg2 = THLongTensor_new();
}
else if(narg == 6
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
&& lua_isboolean(L, 6)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg6 = lua_toboolean(L, 5);
arg7 = lua_toboolean(L, 6);
arg1 = THDoubleTensor_new();
}
else if(narg == 7
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
&& lua_isboolean(L, 6)
&& lua_isboolean(L, 7)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
arg6 = lua_toboolean(L, 6);
arg7 = lua_toboolean(L, 7);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [long] [index] [boolean] [boolean]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_topk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_DoubleTensor_kthvalue(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
long arg5 = 0;
int arg6 = 1;
if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg2 = THLongTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (long)lua_tonumber(L, 2);
arg5 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg2 = THLongTensor_new();
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3);
arg5 = (long)lua_tonumber(L, 4)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4);
arg5 = (long)lua_tonumber(L, 5)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor long [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_kthvalue(arg1,arg2,arg3,arg4,arg5,arg6);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_DoubleTensor_mode(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_mode(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_DoubleTensor_median(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THLongTensor *arg2 = NULL;
int arg2_idx = 0;
THDoubleTensor *arg3 = NULL;
long arg4 = 0;
int arg5 = 1;
if(narg == 1
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = THLongTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg2_idx = 1;
arg1 = THDoubleTensor_new();
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = THDoubleTensor_nDimension(arg3)-1;
}
else if(narg == 2
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (long)lua_tonumber(L, 2)-1;
arg1 = THDoubleTensor_new();
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg2 = THLongTensor_new();
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg2_idx = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2_idx = 2;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] [*LongTensor*] DoubleTensor [index]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
if(arg2_idx)
lua_pushvalue(L, arg2_idx);
else
luaT_pushudata(L, arg2, "torch.LongTensor");
THDoubleTensor_median(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg2, arg2, 1);
return 2;
}

static int m_torch_DoubleTensor_tril(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_tril(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_triu(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
int arg3 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (int)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (int)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [int]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_triu(arg1,arg2,arg3);
return 1;
}

static int m_torch_DoubleTensor_cat(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
long arg4 = -2;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THDoubleTensor **arg6_data = NULL;
long arg6_size = 0;
int arg6_i = 0;
long arg7 = -2;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg4 = (long)lua_tonumber(L, 3)-1;
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (long)lua_tonumber(L, 4)-1;
}
else if(narg == 1
&& torch_isnonemptytable(L, 1)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg5 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_isnonemptytable(L, 2)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

}
else if(narg == 2
&& torch_isnonemptytable(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 1, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 2)-1;
arg5 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_isnonemptytable(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
do
{
  arg6_size++;
  lua_checkstack(L, 1);
  lua_rawgeti(L, 2, arg6_size);
}
while (!lua_isnil(L, -1));
arg6_size--;
lua_pop(L, 1);
arg6_data = (THDoubleTensor**)THAlloc(arg6_size * sizeof(THDoubleTensor*));
for (arg6_i = arg6_size - 1; arg6_i >= 0; arg6_i--)
{
  if (!(arg6_data[arg6_i] = luaT_toudata(L, -1, "torch.DoubleTensor")))
    luaL_error(L, "expected DoubleTensor in tensor array");
  lua_pop(L, 1);
}

arg7 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor DoubleTensor [index] | [*DoubleTensor*] {DoubleTensor+} [index]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_cat(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
if(arg5_idx)
lua_pushvalue(L, arg5_idx);
else
luaT_pushudata(L, arg5, "torch.DoubleTensor");
THDoubleTensor_catArray(arg5,arg6_data,arg6_size,arg7);
THFree(arg6_data);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_random(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
long arg2 = 0;
long arg3 = 0;
long arg4 = 0;
THGenerator *arg5 = NULL;
long arg6 = 0;
long arg7 = 0;
THGenerator *arg8 = NULL;
long arg9 = 0;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
long arg12 = 0;
long arg13 = 0;
THDoubleTensor *arg14 = NULL;
int arg14_idx = 0;
THGenerator *arg15 = NULL;
long arg16 = 0;
THDoubleTensor *arg17 = NULL;
int arg17_idx = 0;
THGenerator *arg18 = NULL;
if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 1);
arg3 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (long)lua_tonumber(L, 2);
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg6 = (long)lua_tonumber(L, 2);
}
else if(narg == 0
)
{
argset = 3;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg8 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 3;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 2);
arg13 = (long)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 4;
arg10_idx = 1;
arg12 = (long)lua_tonumber(L, 3);
arg13 = (long)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg15 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg15 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 5;
arg14_idx = 1;
arg16 = (long)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg17 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 6;
arg17_idx = 1;
lua_getglobal(L,"torch");
arg18 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg17 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg18 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 6;
arg17_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] long long | [Generator] long | [Generator] | *DoubleTensor* [Generator] long long | *DoubleTensor* [Generator] long | *DoubleTensor* [Generator]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_random2__(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
arg7 = THRandom_random1__(arg5,arg6);
lua_pushnumber(L, (lua_Number)arg7);
return 1;
}
else if(argset == 3)
{
arg9 = THRandom_random(arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_random2__(arg10,arg11,arg12,arg13);
return 1;
}
else if(argset == 5)
{
lua_pushvalue(L, arg14_idx);
THDoubleTensor_random1__(arg14,arg15,arg16);
return 1;
}
else if(argset == 6)
{
lua_pushvalue(L, arg17_idx);
THDoubleTensor_random(arg17,arg18);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_geometric(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *DoubleTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_geometric(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_geometric(arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_bernoulli(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0.5;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0.5;
THDoubleTensor *arg7 = NULL;
int arg7_idx = 0;
THGenerator *arg8 = NULL;
THFloatTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THGenerator *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg4_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
lua_getglobal(L,"torch");
arg8 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg8 = luaT_toudata(L, 2, torch_Generator))
&& (arg9 = luaT_toudata(L, 3, "torch.FloatTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 2
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
lua_getglobal(L,"torch");
arg11 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, torch_Generator))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] | *DoubleTensor* [Generator] [double] | *DoubleTensor* [Generator] FloatTensor | *DoubleTensor* [Generator] DoubleTensor", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_bernoulli(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_bernoulli(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
lua_pushvalue(L, arg7_idx);
THDoubleTensor_bernoulli_FloatTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_bernoulli_DoubleTensor(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_squeeze(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_squeeze(arg1,arg2);
if(arg1->nDimension == 1 && arg1->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THDoubleTensor_data(arg1)));
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
{int hasdims = arg4->nDimension > 1;
THDoubleTensor_squeeze1d(arg3,arg4,arg5);
if(!hasdims && arg3->nDimension == 1 && arg3->size[0] == 1)
lua_pushnumber(L, (lua_Number)(*THDoubleTensor_data(arg3)));}
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_sign(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sign(arg1,arg2);
return 1;
}

static int m_torch_DoubleTensor_conv2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'C';
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
double arg11 = 0;
double arg12 = 1;
THDoubleTensor *arg13 = NULL;
THDoubleTensor *arg14 = NULL;
double arg15 = 1;
double arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'C';
THDoubleTensor *arg19 = NULL;
int arg19_idx = 0;
double arg20 = 0;
double arg21 = 1;
THDoubleTensor *arg22 = NULL;
THDoubleTensor *arg23 = NULL;
double arg24 = 1;
double arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~2D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.DoubleTensor");
THDoubleTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.DoubleTensor");
THDoubleTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_xcorr2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
const char *arg8 = NULL;
char arg8_default = 'V';
const char *arg9 = NULL;
char arg9_default = 'X';
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
double arg11 = 0;
double arg12 = 1;
THDoubleTensor *arg13 = NULL;
THDoubleTensor *arg14 = NULL;
double arg15 = 1;
double arg16 = 1;
const char *arg17 = NULL;
char arg17_default = 'V';
const char *arg18 = NULL;
char arg18_default = 'X';
THDoubleTensor *arg19 = NULL;
int arg19_idx = 0;
double arg20 = 0;
double arg21 = 1;
THDoubleTensor *arg22 = NULL;
THDoubleTensor *arg23 = NULL;
double arg24 = 1;
double arg25 = 1;
const char *arg26 = NULL;
char arg26_default = 'V';
const char *arg27 = NULL;
char arg27_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
)
{
argset = 1;
arg1_idx = 1;
arg8 = &arg8_default;
arg9 = &arg9_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 3)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 2)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 2)
&& (arg8 = lua_tostring(L, 4)) && (*arg8 == 'V' || *arg8 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
}
else if(narg == 2
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
)
{
argset = 2;
arg10_idx = 1;
arg17 = &arg17_default;
arg18 = &arg18_default;
}
else if(narg == 3
&& (arg13 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 3)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10 = THDoubleTensor_new();
arg18 = &arg18_default;
}
else if(narg == 4
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg13 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg13->nDimension == 3)
&& (arg14 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg14->nDimension == 3)
&& (arg17 = lua_tostring(L, 4)) && (*arg17 == 'V' || *arg17 == 'F')
)
{
argset = 2;
arg10_idx = 1;
arg18 = &arg18_default;
}
else if(narg == 2
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
)
{
argset = 3;
arg19_idx = 1;
arg26 = &arg26_default;
arg27 = &arg27_default;
}
else if(narg == 3
&& (arg22 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 3)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19 = THDoubleTensor_new();
arg27 = &arg27_default;
}
else if(narg == 4
&& (arg19 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg22 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg22->nDimension == 3)
&& (arg23 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg23->nDimension == 4)
&& (arg26 = lua_tostring(L, 4)) && (*arg26 == 'V' || *arg26 == 'F')
)
{
argset = 3;
arg19_idx = 1;
arg27 = &arg27_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~2D DoubleTensor~2D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~3D DoubleTensor~4D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv2Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
return 1;
}
else if(argset == 2)
{
if(arg10_idx)
lua_pushvalue(L, arg10_idx);
else
luaT_pushudata(L, arg10, "torch.DoubleTensor");
THDoubleTensor_conv2Dcmul(arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
return 1;
}
else if(argset == 3)
{
if(arg19_idx)
lua_pushvalue(L, arg19_idx);
else
luaT_pushudata(L, arg19, "torch.DoubleTensor");
THDoubleTensor_conv2Dmv(arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_conv3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
double arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'C';
THDoubleTensor *arg11 = NULL;
int arg11_idx = 0;
double arg12 = 0;
double arg13 = 1;
THDoubleTensor *arg14 = NULL;
THDoubleTensor *arg15 = NULL;
double arg16 = 1;
double arg17 = 1;
double arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'C';
THDoubleTensor *arg21 = NULL;
int arg21_idx = 0;
double arg22 = 0;
double arg23 = 1;
THDoubleTensor *arg24 = NULL;
THDoubleTensor *arg25 = NULL;
double arg26 = 1;
double arg27 = 1;
double arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'C';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~4D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.DoubleTensor");
THDoubleTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.DoubleTensor");
THDoubleTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_xcorr3(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 1;
THDoubleTensor *arg4 = NULL;
THDoubleTensor *arg5 = NULL;
double arg6 = 1;
double arg7 = 1;
double arg8 = 1;
const char *arg9 = NULL;
char arg9_default = 'V';
const char *arg10 = NULL;
char arg10_default = 'X';
THDoubleTensor *arg11 = NULL;
int arg11_idx = 0;
double arg12 = 0;
double arg13 = 1;
THDoubleTensor *arg14 = NULL;
THDoubleTensor *arg15 = NULL;
double arg16 = 1;
double arg17 = 1;
double arg18 = 1;
const char *arg19 = NULL;
char arg19_default = 'V';
const char *arg20 = NULL;
char arg20_default = 'X';
THDoubleTensor *arg21 = NULL;
int arg21_idx = 0;
double arg22 = 0;
double arg23 = 1;
THDoubleTensor *arg24 = NULL;
THDoubleTensor *arg25 = NULL;
double arg26 = 1;
double arg27 = 1;
double arg28 = 1;
const char *arg29 = NULL;
char arg29_default = 'V';
const char *arg30 = NULL;
char arg30_default = 'X';
if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
)
{
argset = 1;
arg1_idx = 1;
arg9 = &arg9_default;
arg10 = &arg10_default;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 3)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1 = THDoubleTensor_new();
arg10 = &arg10_default;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg4->nDimension == 3)
&& (arg5 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg5->nDimension == 3)
&& (arg9 = lua_tostring(L, 4)) && (*arg9 == 'V' || *arg9 == 'F')
)
{
argset = 1;
arg1_idx = 1;
arg10 = &arg10_default;
}
else if(narg == 2
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
)
{
argset = 2;
arg11_idx = 1;
arg19 = &arg19_default;
arg20 = &arg20_default;
}
else if(narg == 3
&& (arg14 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 3)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11 = THDoubleTensor_new();
arg20 = &arg20_default;
}
else if(narg == 4
&& (arg11 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg14 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg14->nDimension == 4)
&& (arg15 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg15->nDimension == 4)
&& (arg19 = lua_tostring(L, 4)) && (*arg19 == 'V' || *arg19 == 'F')
)
{
argset = 2;
arg11_idx = 1;
arg20 = &arg20_default;
}
else if(narg == 2
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
)
{
argset = 3;
arg21_idx = 1;
arg29 = &arg29_default;
arg30 = &arg30_default;
}
else if(narg == 3
&& (arg24 = luaT_toudata(L, 1, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 3)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21 = THDoubleTensor_new();
arg30 = &arg30_default;
}
else if(narg == 4
&& (arg21 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg24 = luaT_toudata(L, 2, "torch.DoubleTensor")) && (arg24->nDimension == 4)
&& (arg25 = luaT_toudata(L, 3, "torch.DoubleTensor")) && (arg25->nDimension == 5)
&& (arg29 = lua_tostring(L, 4)) && (*arg29 == 'V' || *arg29 == 'F')
)
{
argset = 3;
arg21_idx = 1;
arg30 = &arg30_default;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor~3D DoubleTensor~3D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~4D [(V|F)] | [*DoubleTensor*] DoubleTensor~4D DoubleTensor~5D [(V|F)]", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_conv3Dmul(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
return 1;
}
else if(argset == 2)
{
if(arg11_idx)
lua_pushvalue(L, arg11_idx);
else
luaT_pushudata(L, arg11, "torch.DoubleTensor");
THDoubleTensor_conv3Dcmul(arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
return 1;
}
else if(argset == 3)
{
if(arg21_idx)
lua_pushvalue(L, arg21_idx);
else
luaT_pushudata(L, arg21, "torch.DoubleTensor");
THDoubleTensor_conv3Dmv(arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_lt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_ltValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_ltValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_ltTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_ltTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_gt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_gtValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_gtValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_gtTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_gtTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_le(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_leValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_leValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_leTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_leTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_ge(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_geValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_geValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_geTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_geTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_eq(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_eqValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_eqValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_eqTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_eqTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_ne(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THByteTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
THByteTensor *arg7 = NULL;
int arg7_idx = 0;
THDoubleTensor *arg8 = NULL;
THDoubleTensor *arg9 = NULL;
THDoubleTensor *arg10 = NULL;
int arg10_idx = 0;
THDoubleTensor *arg11 = NULL;
THDoubleTensor *arg12 = NULL;
if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
arg1 = THByteTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg8 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 3;
arg7 = THByteTensor_new();
}
else if(narg == 3
&& (arg7 = luaT_toudata(L, 1, "torch.ByteTensor"))
&& (arg8 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg9 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 3;
arg7_idx = 1;
}
else if(narg == 3
&& (arg10 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg11 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg12 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 4;
arg10_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*ByteTensor*] DoubleTensor double | *DoubleTensor* DoubleTensor double | [*ByteTensor*] DoubleTensor DoubleTensor | *DoubleTensor* DoubleTensor DoubleTensor", type_buf);
}
if(argset == 1)
{
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.ByteTensor");
THDoubleTensor_neValue(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_neValueT(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
if(arg7_idx)
lua_pushvalue(L, arg7_idx);
else
luaT_pushudata(L, arg7, "torch.ByteTensor");
THDoubleTensor_neTensor(arg7,arg8,arg9);
return 1;
}
else if(argset == 4)
{
lua_pushvalue(L, arg10_idx);
THDoubleTensor_neTensorT(arg10,arg11,arg12);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_nonzero(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THLongTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*LongTensor*] DoubleTensor", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.LongTensor");
THDoubleTensor_nonzero(arg1,arg2);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_DoubleTensor_mean(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_meanall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_mean(arg3,arg4,arg5,arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_var(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_varall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_var(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_std(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 0;
THDoubleTensor *arg3 = NULL;
int arg3_idx = 0;
THDoubleTensor *arg4 = NULL;
long arg5 = 0;
int arg6 = 0;
int arg7 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg3 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isboolean(L, 3)
)
{
argset = 2;
arg5 = (long)lua_tonumber(L, 2)-1;
arg6 = lua_toboolean(L, 3);
arg3 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg3 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg4 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
argset = 2;
arg3_idx = 1;
arg5 = (long)lua_tonumber(L, 3)-1;
arg6 = lua_toboolean(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor | [*DoubleTensor*] DoubleTensor index [boolean]", type_buf);
}
if(argset == 1)
{
arg2 = THDoubleTensor_stdall(arg1);
lua_pushnumber(L, (lua_Number)arg2);
return 1;
}
else if(argset == 2)
{
if(arg3_idx)
lua_pushvalue(L, arg3_idx);
else
luaT_pushudata(L, arg3, "torch.DoubleTensor");
THDoubleTensor_std(arg3,arg4,arg5,arg6,arg7);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_histc(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_histc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_DoubleTensor_bhistc(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
long arg3 = 100;
double arg4 = 0;
double arg5 = 0;
if(narg == 1
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1 = THDoubleTensor_new();
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 2
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
arg5 = (double)lua_tonumber(L, 2);
arg1 = THDoubleTensor_new();
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg5 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg4 = (double)lua_tonumber(L, 2);
arg5 = (double)lua_tonumber(L, 3);
arg1 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg2 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg3 = (long)lua_tonumber(L, 2);
arg4 = (double)lua_tonumber(L, 3);
arg5 = (double)lua_tonumber(L, 4);
arg1 = THDoubleTensor_new();
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (long)lua_tonumber(L, 3);
arg4 = (double)lua_tonumber(L, 4);
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [*DoubleTensor*] DoubleTensor [long] [double] [double]", type_buf);
}
if(arg1_idx)
lua_pushvalue(L, arg1_idx);
else
luaT_pushudata(L, arg1, "torch.DoubleTensor");
THDoubleTensor_bhistc(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_DoubleTensor_norm(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
double arg2 = 2;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THDoubleTensor *arg5 = NULL;
double arg6 = 0;
long arg7 = 0;
int arg8 = 1;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg6 = (double)lua_tonumber(L, 2);
arg7 = (long)lua_tonumber(L, 3)-1;
arg4 = THDoubleTensor_new();
}
else if(narg == 4
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
arg7 = (long)lua_tonumber(L, 4)-1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor [double] | [*DoubleTensor*] DoubleTensor double index", type_buf);
}
if(argset == 1)
{
arg3 = THDoubleTensor_normall(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
if(arg4_idx)
lua_pushvalue(L, arg4_idx);
else
luaT_pushudata(L, arg4, "torch.DoubleTensor");
THDoubleTensor_norm(arg4,arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_renorm(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
long arg4 = 0;
double arg5 = 0;
if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg4 = (long)lua_tonumber(L, 3)-1;
arg5 = (double)lua_tonumber(L, 4);
arg2 = arg1;
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
&& lua_isnumber(L, 5)
)
{
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4)-1;
arg5 = (double)lua_tonumber(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double index double", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_renorm(arg1,arg2,arg3,arg4,arg5);
return 1;
}

static int m_torch_DoubleTensor_dist(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
THDoubleTensor *arg2 = NULL;
double arg3 = 2;
double arg4 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
arg3 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: DoubleTensor DoubleTensor [double]", type_buf);
}
arg4 = THDoubleTensor_dist(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}

static int m_torch_DoubleTensor_linspace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
long arg4 = 100;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* double double [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_linspace(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_logspace(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
double arg2 = 0;
double arg3 = 0;
long arg4 = 100;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
arg1_idx = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
arg4 = (long)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* double double [long]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_logspace(arg1,arg2,arg3,arg4);
return 1;
}

static int m_torch_DoubleTensor_log(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_log(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_log1p(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_log1p(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = log1p(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_exp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_exp(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = exp(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_cos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_acos(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_acos(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = acos(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_cosh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cosh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = cosh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_sin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_asin(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_asin(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = asin(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_sinh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sinh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sinh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_tan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_tan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_atan(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_atan(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = atan(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_tanh(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_tanh(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = tanh(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_sqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = sqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_round(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_round(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = round(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_ceil(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_ceil(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = ceil(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_floor(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_floor(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = floor(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_trunc(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_trunc(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = trunc(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_abs(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_abs(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = fabs(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_frac(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_frac(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_frac(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_rsqrt(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_rsqrt(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_rsqrt(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_sigmoid(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
double arg4 = 0;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 2;
arg3 = (double)lua_tonumber(L, 1);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] | double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_sigmoid(arg1,arg2);
return 1;
}
else if(argset == 2)
{
arg4 = TH_sigmoid(arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_neg(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_neg(arg1,arg2);
return 1;
}

static int m_torch_DoubleTensor_cinv(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
if(narg == 1
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
arg1_idx = 1;
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_cinv(arg1,arg2);
return 1;
}

static int m_torch_DoubleTensor_lerp(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 0;
double arg5 = 0;
double arg6 = 0;
double arg7 = 0;
double arg8 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 3);
arg2 = arg1;
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
argset = 1;
arg1_idx = 1;
arg4 = (double)lua_tonumber(L, 4);
}
else if(narg == 3
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5 = (double)lua_tonumber(L, 1);
arg6 = (double)lua_tonumber(L, 2);
arg7 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor double | double double double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_lerp(arg1,arg2,arg3,arg4);
return 1;
}
else if(argset == 2)
{
arg8 = TH_lerp(arg5,arg6,arg7);
lua_pushnumber(L, (lua_Number)arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_atan2(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
double arg4 = 0;
double arg5 = 0;
double arg6 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 1;
arg1_idx = 1;
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4 = (double)lua_tonumber(L, 1);
arg5 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] DoubleTensor | double double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_atan2(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
arg6 = atan2(arg4,arg5);
lua_pushnumber(L, (lua_Number)arg6);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_pow(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THDoubleTensor *arg2 = NULL;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
double arg5 = 0;
THDoubleTensor *arg6 = NULL;
double arg7 = 0;
double arg8 = 0;
double arg9 = 0;
if(narg == 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 2);
arg2 = arg1;
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg1_idx = 1;
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg5 = (double)lua_tonumber(L, 2);
arg6 = arg4;
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& (arg6 = luaT_toudata(L, 3, "torch.DoubleTensor"))
)
{
argset = 2;
arg4_idx = 1;
arg5 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 3;
arg7 = (double)lua_tonumber(L, 1);
arg8 = (double)lua_tonumber(L, 2);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [DoubleTensor] double | *DoubleTensor* double [DoubleTensor] | double double", type_buf);
}
if(argset == 1)
{
lua_pushvalue(L, arg1_idx);
THDoubleTensor_pow(arg1,arg2,arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_tpow(arg4,arg5,arg6);
return 1;
}
else if(argset == 3)
{
arg9 = pow(arg7,arg8);
lua_pushnumber(L, (lua_Number)arg9);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_rand(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_rand(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_DoubleTensor_randn(lua_State *L)
{
int narg = lua_gettop(L);
THDoubleTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THLongStorage *arg3 = NULL;
if(narg >= 2
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& torch_islongargs(L, 2)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 2);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg >= 3
&& (arg1 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& torch_islongargs(L, 3)
)
{
arg1_idx = 1;
arg3 = torch_checklongargs(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *DoubleTensor* [Generator] (LongStorage | dim1 [dim2...])", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_randn(arg1,arg2,arg3);
THLongStorage_free(arg3);
return 1;
}

static int m_torch_DoubleTensor_multinomial(lua_State *L)
{
int narg = lua_gettop(L);
THLongTensor *arg1 = NULL;
int arg1_idx = 0;
THGenerator *arg2 = NULL;
THDoubleTensor *arg3 = NULL;
int arg4 = 0;
int arg5 = 0;
if(narg == 3
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
}
else if(narg == 4
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg3 = luaT_toudata(L, 2, "torch.DoubleTensor"))
&& lua_isnumber(L, 3)
&& lua_isboolean(L, 4)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 3);
arg5 = lua_toboolean(L, 4);
lua_getglobal(L,"torch");
arg2 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 5
&& (arg1 = luaT_toudata(L, 1, "torch.LongTensor"))
&& (arg2 = luaT_toudata(L, 2, torch_Generator))
&& (arg3 = luaT_toudata(L, 3, "torch.DoubleTensor"))
&& lua_isnumber(L, 4)
&& lua_isboolean(L, 5)
)
{
THLongTensor_add(arg1, arg1, -1);
arg1_idx = 1;
arg4 = (int)lua_tonumber(L, 4);
arg5 = lua_toboolean(L, 5);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: *LongTensor* [Generator] DoubleTensor int [boolean]", type_buf);
}
lua_pushvalue(L, arg1_idx);
THDoubleTensor_multinomial(arg1,arg2,arg3,arg4,arg5);
THLongTensor_add(arg1, arg1, 1);
return 1;
}

static int m_torch_DoubleTensor_uniform(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_uniform(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_uniform(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_normal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_normal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_normal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_cauchy(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 1;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 0;
double arg8 = 1;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_cauchy(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_cauchy(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_logNormal(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 1;
double arg3 = 2;
double arg4 = 0;
THDoubleTensor *arg5 = NULL;
int arg5_idx = 0;
THGenerator *arg6 = NULL;
double arg7 = 1;
double arg8 = 2;
if(narg == 0
)
{
argset = 1;
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 1
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
)
{
argset = 1;
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg3 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& lua_isnumber(L, 1)
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
arg3 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
arg3 = (double)lua_tonumber(L, 3);
}
else if(narg == 1
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
)
{
argset = 2;
arg5_idx = 1;
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
)
{
argset = 2;
arg5_idx = 1;
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
}
else if(narg == 2
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg8 = (double)lua_tonumber(L, 3);
}
else if(narg == 3
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 2);
arg8 = (double)lua_tonumber(L, 3);
lua_getglobal(L,"torch");
arg6 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 4
&& (arg5 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg6 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
&& lua_isnumber(L, 4)
)
{
argset = 2;
arg5_idx = 1;
arg7 = (double)lua_tonumber(L, 3);
arg8 = (double)lua_tonumber(L, 4);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] [double] [double] | *DoubleTensor* [Generator] [double] [double]", type_buf);
}
if(argset == 1)
{
arg4 = THRandom_logNormal(arg1,arg2,arg3);
lua_pushnumber(L, (lua_Number)arg4);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg5_idx);
THDoubleTensor_logNormal(arg5,arg6,arg7,arg8);
return 1;
}
return 0;
}

static int m_torch_DoubleTensor_exponential(lua_State *L)
{
int narg = lua_gettop(L);
int argset = 0;
THGenerator *arg1 = NULL;
double arg2 = 0;
double arg3 = 0;
THDoubleTensor *arg4 = NULL;
int arg4_idx = 0;
THGenerator *arg5 = NULL;
double arg6 = 0;
if(narg == 1
&& lua_isnumber(L, 1)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 1);
lua_getglobal(L,"torch");
arg1 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 2
&& (arg1 = luaT_toudata(L, 1, torch_Generator))
&& lua_isnumber(L, 2)
)
{
argset = 1;
arg2 = (double)lua_tonumber(L, 2);
}
else if(narg == 2
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& lua_isnumber(L, 2)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 2);
lua_getglobal(L,"torch");
arg5 = luaT_getfieldcheckudata(L, -1, "_gen", torch_Generator);
lua_pop(L, 2);
}
else if(narg == 3
&& (arg4 = luaT_toudata(L, 1, "torch.DoubleTensor"))
&& (arg5 = luaT_toudata(L, 2, torch_Generator))
&& lua_isnumber(L, 3)
)
{
argset = 2;
arg4_idx = 1;
arg6 = (double)lua_tonumber(L, 3);
}
else
{
char type_buf[512];
str_arg_types(L, type_buf, 512);
luaL_error(L, "invalid arguments: %s\nexpected arguments: [Generator] double | *DoubleTensor* [Generator] double", type_buf);
}
if(argset == 1)
{
arg3 = THRandom_exponential(arg1,arg2);
lua_pushnumber(L, (lua_Number)arg3);
return 1;
}
else if(argset == 2)
{
lua_pushvalue(L, arg4_idx);
THDoubleTensor_exponential(arg4,arg5,arg6);
return 1;
}
return 0;
}

static const struct luaL_Reg m_torch_DoubleTensorMath__ [] = {
{"zero", m_torch_DoubleTensor_zero},
{"fill", m_torch_DoubleTensor_fill},
{"zeros", m_torch_DoubleTensor_zeros},
{"ones", m_torch_DoubleTensor_ones},
{"reshape", m_torch_DoubleTensor_reshape},
{"gather", m_torch_DoubleTensor_gather},
{"scatter", m_torch_DoubleTensor_scatter},
{"dot", m_torch_DoubleTensor_dot},
{"equal", m_torch_DoubleTensor_equal},
{"add", m_torch_DoubleTensor_add},
{"csub", m_torch_DoubleTensor_csub},
{"mul", m_torch_DoubleTensor_mul},
{"div", m_torch_DoubleTensor_div},
{"lshift", m_torch_DoubleTensor_lshift},
{"rshift", m_torch_DoubleTensor_rshift},
{"fmod", m_torch_DoubleTensor_fmod},
{"remainder", m_torch_DoubleTensor_remainder},
{"bitand", m_torch_DoubleTensor_bitand},
{"bitor", m_torch_DoubleTensor_bitor},
{"bitxor", m_torch_DoubleTensor_bitxor},
{"mod", m_torch_DoubleTensor_mod},
{"clamp", m_torch_DoubleTensor_clamp},
{"match", m_torch_DoubleTensor_match},
{"cmul", m_torch_DoubleTensor_cmul},
{"cpow", m_torch_DoubleTensor_cpow},
{"cdiv", m_torch_DoubleTensor_cdiv},
{"clshift", m_torch_DoubleTensor_clshift},
{"crshift", m_torch_DoubleTensor_crshift},
{"cfmod", m_torch_DoubleTensor_cfmod},
{"cremainder", m_torch_DoubleTensor_cremainder},
{"cbitand", m_torch_DoubleTensor_cbitand},
{"cbitor", m_torch_DoubleTensor_cbitor},
{"cbitxor", m_torch_DoubleTensor_cbitxor},
{"cmod", m_torch_DoubleTensor_cmod},
{"addcmul", m_torch_DoubleTensor_addcmul},
{"addcdiv", m_torch_DoubleTensor_addcdiv},
{"mv", m_torch_DoubleTensor_mv},
{"mm", m_torch_DoubleTensor_mm},
{"bmm", m_torch_DoubleTensor_bmm},
{"ger", m_torch_DoubleTensor_ger},
{"addmv", m_torch_DoubleTensor_addmv},
{"addmm", m_torch_DoubleTensor_addmm},
{"addr", m_torch_DoubleTensor_addr},
{"addbmm", m_torch_DoubleTensor_addbmm},
{"baddbmm", m_torch_DoubleTensor_baddbmm},
{"numel", m_torch_DoubleTensor_numel},
{"cumsum", m_torch_DoubleTensor_cumsum},
{"cumprod", m_torch_DoubleTensor_cumprod},
{"sum", m_torch_DoubleTensor_sum},
{"prod", m_torch_DoubleTensor_prod},
{"min", m_torch_DoubleTensor_min},
{"max", m_torch_DoubleTensor_max},
{"cmin", m_torch_DoubleTensor_cmin},
{"cmax", m_torch_DoubleTensor_cmax},
{"trace", m_torch_DoubleTensor_trace},
{"cross", m_torch_DoubleTensor_cross},
{"diag", m_torch_DoubleTensor_diag},
{"eye", m_torch_DoubleTensor_eye},
{"range", m_torch_DoubleTensor_range},
{"randperm", m_torch_DoubleTensor_randperm},
{"sort", m_torch_DoubleTensor_sort},
{"topk", m_torch_DoubleTensor_topk},
{"kthvalue", m_torch_DoubleTensor_kthvalue},
{"mode", m_torch_DoubleTensor_mode},
{"median", m_torch_DoubleTensor_median},
{"tril", m_torch_DoubleTensor_tril},
{"triu", m_torch_DoubleTensor_triu},
{"cat", m_torch_DoubleTensor_cat},
{"random", m_torch_DoubleTensor_random},
{"geometric", m_torch_DoubleTensor_geometric},
{"bernoulli", m_torch_DoubleTensor_bernoulli},
{"squeeze", m_torch_DoubleTensor_squeeze},
{"sign", m_torch_DoubleTensor_sign},
{"conv2", m_torch_DoubleTensor_conv2},
{"xcorr2", m_torch_DoubleTensor_xcorr2},
{"conv3", m_torch_DoubleTensor_conv3},
{"xcorr3", m_torch_DoubleTensor_xcorr3},
{"lt", m_torch_DoubleTensor_lt},
{"gt", m_torch_DoubleTensor_gt},
{"le", m_torch_DoubleTensor_le},
{"ge", m_torch_DoubleTensor_ge},
{"eq", m_torch_DoubleTensor_eq},
{"ne", m_torch_DoubleTensor_ne},
{"nonzero", m_torch_DoubleTensor_nonzero},
{"mean", m_torch_DoubleTensor_mean},
{"var", m_torch_DoubleTensor_var},
{"std", m_torch_DoubleTensor_std},
{"histc", m_torch_DoubleTensor_histc},
{"bhistc", m_torch_DoubleTensor_bhistc},
{"norm", m_torch_DoubleTensor_norm},
{"renorm", m_torch_DoubleTensor_renorm},
{"dist", m_torch_DoubleTensor_dist},
{"linspace", m_torch_DoubleTensor_linspace},
{"logspace", m_torch_DoubleTensor_logspace},
{"log", m_torch_DoubleTensor_log},
{"log1p", m_torch_DoubleTensor_log1p},
{"exp", m_torch_DoubleTensor_exp},
{"cos", m_torch_DoubleTensor_cos},
{"acos", m_torch_DoubleTensor_acos},
{"cosh", m_torch_DoubleTensor_cosh},
{"sin", m_torch_DoubleTensor_sin},
{"asin", m_torch_DoubleTensor_asin},
{"sinh", m_torch_DoubleTensor_sinh},
{"tan", m_torch_DoubleTensor_tan},
{"atan", m_torch_DoubleTensor_atan},
{"tanh", m_torch_DoubleTensor_tanh},
{"sqrt", m_torch_DoubleTensor_sqrt},
{"round", m_torch_DoubleTensor_round},
{"ceil", m_torch_DoubleTensor_ceil},
{"floor", m_torch_DoubleTensor_floor},
{"trunc", m_torch_DoubleTensor_trunc},
{"abs", m_torch_DoubleTensor_abs},
{"frac", m_torch_DoubleTensor_frac},
{"rsqrt", m_torch_DoubleTensor_rsqrt},
{"sigmoid", m_torch_DoubleTensor_sigmoid},
{"neg", m_torch_DoubleTensor_neg},
{"cinv", m_torch_DoubleTensor_cinv},
{"lerp", m_torch_DoubleTensor_lerp},
{"atan2", m_torch_DoubleTensor_atan2},
{"pow", m_torch_DoubleTensor_pow},
{"rand", m_torch_DoubleTensor_rand},
{"randn", m_torch_DoubleTensor_randn},
{"multinomial", m_torch_DoubleTensor_multinomial},
{"uniform", m_torch_DoubleTensor_uniform},
{"normal", m_torch_DoubleTensor_normal},
{"cauchy", m_torch_DoubleTensor_cauchy},
{"logNormal", m_torch_DoubleTensor_logNormal},
{"exponential", m_torch_DoubleTensor_exponential},
{NULL, NULL}
};

static const struct luaL_Reg torch_DoubleTensorMath__ [] = {
{"zero", torch_DoubleTensor_zero},
{"fill", torch_DoubleTensor_fill},
{"zeros", torch_DoubleTensor_zeros},
{"ones", torch_DoubleTensor_ones},
{"reshape", torch_DoubleTensor_reshape},
{"gather", torch_DoubleTensor_gather},
{"scatter", torch_DoubleTensor_scatter},
{"dot", torch_DoubleTensor_dot},
{"equal", torch_DoubleTensor_equal},
{"add", torch_DoubleTensor_add},
{"csub", torch_DoubleTensor_csub},
{"mul", torch_DoubleTensor_mul},
{"div", torch_DoubleTensor_div},
{"lshift", torch_DoubleTensor_lshift},
{"rshift", torch_DoubleTensor_rshift},
{"fmod", torch_DoubleTensor_fmod},
{"remainder", torch_DoubleTensor_remainder},
{"bitand", torch_DoubleTensor_bitand},
{"bitor", torch_DoubleTensor_bitor},
{"bitxor", torch_DoubleTensor_bitxor},
{"mod", torch_DoubleTensor_mod},
{"clamp", torch_DoubleTensor_clamp},
{"match", torch_DoubleTensor_match},
{"cmul", torch_DoubleTensor_cmul},
{"cpow", torch_DoubleTensor_cpow},
{"cdiv", torch_DoubleTensor_cdiv},
{"clshift", torch_DoubleTensor_clshift},
{"crshift", torch_DoubleTensor_crshift},
{"cfmod", torch_DoubleTensor_cfmod},
{"cremainder", torch_DoubleTensor_cremainder},
{"cbitand", torch_DoubleTensor_cbitand},
{"cbitor", torch_DoubleTensor_cbitor},
{"cbitxor", torch_DoubleTensor_cbitxor},
{"cmod", torch_DoubleTensor_cmod},
{"addcmul", torch_DoubleTensor_addcmul},
{"addcdiv", torch_DoubleTensor_addcdiv},
{"mv", torch_DoubleTensor_mv},
{"mm", torch_DoubleTensor_mm},
{"bmm", torch_DoubleTensor_bmm},
{"ger", torch_DoubleTensor_ger},
{"addmv", torch_DoubleTensor_addmv},
{"addmm", torch_DoubleTensor_addmm},
{"addr", torch_DoubleTensor_addr},
{"addbmm", torch_DoubleTensor_addbmm},
{"baddbmm", torch_DoubleTensor_baddbmm},
{"numel", torch_DoubleTensor_numel},
{"cumsum", torch_DoubleTensor_cumsum},
{"cumprod", torch_DoubleTensor_cumprod},
{"sum", torch_DoubleTensor_sum},
{"prod", torch_DoubleTensor_prod},
{"min", torch_DoubleTensor_min},
{"max", torch_DoubleTensor_max},
{"cmin", torch_DoubleTensor_cmin},
{"cmax", torch_DoubleTensor_cmax},
{"trace", torch_DoubleTensor_trace},
{"cross", torch_DoubleTensor_cross},
{"diag", torch_DoubleTensor_diag},
{"eye", torch_DoubleTensor_eye},
{"range", torch_DoubleTensor_range},
{"randperm", torch_DoubleTensor_randperm},
{"sort", torch_DoubleTensor_sort},
{"topk", torch_DoubleTensor_topk},
{"kthvalue", torch_DoubleTensor_kthvalue},
{"mode", torch_DoubleTensor_mode},
{"median", torch_DoubleTensor_median},
{"tril", torch_DoubleTensor_tril},
{"triu", torch_DoubleTensor_triu},
{"cat", torch_DoubleTensor_cat},
{"random", torch_DoubleTensor_random},
{"geometric", torch_DoubleTensor_geometric},
{"bernoulli", torch_DoubleTensor_bernoulli},
{"squeeze", torch_DoubleTensor_squeeze},
{"sign", torch_DoubleTensor_sign},
{"conv2", torch_DoubleTensor_conv2},
{"xcorr2", torch_DoubleTensor_xcorr2},
{"conv3", torch_DoubleTensor_conv3},
{"xcorr3", torch_DoubleTensor_xcorr3},
{"lt", torch_DoubleTensor_lt},
{"gt", torch_DoubleTensor_gt},
{"le", torch_DoubleTensor_le},
{"ge", torch_DoubleTensor_ge},
{"eq", torch_DoubleTensor_eq},
{"ne", torch_DoubleTensor_ne},
{"nonzero", torch_DoubleTensor_nonzero},
{"mean", torch_DoubleTensor_mean},
{"var", torch_DoubleTensor_var},
{"std", torch_DoubleTensor_std},
{"histc", torch_DoubleTensor_histc},
{"bhistc", torch_DoubleTensor_bhistc},
{"norm", torch_DoubleTensor_norm},
{"renorm", torch_DoubleTensor_renorm},
{"dist", torch_DoubleTensor_dist},
{"linspace", torch_DoubleTensor_linspace},
{"logspace", torch_DoubleTensor_logspace},
{"log", torch_DoubleTensor_log},
{"log1p", torch_DoubleTensor_log1p},
{"exp", torch_DoubleTensor_exp},
{"cos", torch_DoubleTensor_cos},
{"acos", torch_DoubleTensor_acos},
{"cosh", torch_DoubleTensor_cosh},
{"sin", torch_DoubleTensor_sin},
{"asin", torch_DoubleTensor_asin},
{"sinh", torch_DoubleTensor_sinh},
{"tan", torch_DoubleTensor_tan},
{"atan", torch_DoubleTensor_atan},
{"tanh", torch_DoubleTensor_tanh},
{"sqrt", torch_DoubleTensor_sqrt},
{"round", torch_DoubleTensor_round},
{"ceil", torch_DoubleTensor_ceil},
{"floor", torch_DoubleTensor_floor},
{"trunc", torch_DoubleTensor_trunc},
{"abs", torch_DoubleTensor_abs},
{"frac", torch_DoubleTensor_frac},
{"rsqrt", torch_DoubleTensor_rsqrt},
{"sigmoid", torch_DoubleTensor_sigmoid},
{"neg", torch_DoubleTensor_neg},
{"cinv", torch_DoubleTensor_cinv},
{"lerp", torch_DoubleTensor_lerp},
{"atan2", torch_DoubleTensor_atan2},
{"pow", torch_DoubleTensor_pow},
{"rand", torch_DoubleTensor_rand},
{"randn", torch_DoubleTensor_randn},
{"multinomial", torch_DoubleTensor_multinomial},
{"uniform", torch_DoubleTensor_uniform},
{"normal", torch_DoubleTensor_normal},
{"cauchy", torch_DoubleTensor_cauchy},
{"logNormal", torch_DoubleTensor_logNormal},
{"exponential", torch_DoubleTensor_exponential},
{"gesv", torch_DoubleTensor_gesv},
{"gels", torch_DoubleTensor_gels},
{"trtrs", torch_DoubleTensor_trtrs},
{"symeig", torch_DoubleTensor_symeig},
{"eig", torch_DoubleTensor_eig},
{"svd", torch_DoubleTensor_svd},
{"inverse", torch_DoubleTensor_inverse},
{"potrf", torch_DoubleTensor_potrf},
{"potrs", torch_DoubleTensor_potrs},
{"potri", torch_DoubleTensor_potri},
{"pstrf", torch_DoubleTensor_pstrf},
{"qr", torch_DoubleTensor_qr},
{"geqrf", torch_DoubleTensor_geqrf},
{"orgqr", torch_DoubleTensor_orgqr},
{"ormqr", torch_DoubleTensor_ormqr},
{NULL, NULL}
};

static void torch_DoubleTensorMath_init(lua_State *L)
{
  luaT_pushmetatable(L, "torch.DoubleTensor");

  /* register methods */
  luaT_setfuncs(L, m_torch_DoubleTensorMath__, 0);

  /* register functions into the "torch" field of the tensor metaclass */
  lua_pushstring(L, "torch");
  lua_newtable(L);
  luaT_setfuncs(L, torch_DoubleTensorMath__, 0);
  lua_rawset(L, -3);
  lua_pop(L, 1);
}

static const struct luaL_Reg torch_TensorMath__ [] = {
{"zero", torch_zero},
{"fill", torch_fill},
{"zeros", torch_zeros},
{"ones", torch_ones},
{"reshape", torch_reshape},
{"gather", torch_gather},
{"scatter", torch_scatter},
{"dot", torch_dot},
{"equal", torch_equal},
{"add", torch_add},
{"csub", torch_csub},
{"mul", torch_mul},
{"div", torch_div},
{"lshift", torch_lshift},
{"rshift", torch_rshift},
{"fmod", torch_fmod},
{"remainder", torch_remainder},
{"bitand", torch_bitand},
{"bitor", torch_bitor},
{"bitxor", torch_bitxor},
{"mod", torch_mod},
{"clamp", torch_clamp},
{"match", torch_match},
{"cmul", torch_cmul},
{"cpow", torch_cpow},
{"cdiv", torch_cdiv},
{"clshift", torch_clshift},
{"crshift", torch_crshift},
{"cfmod", torch_cfmod},
{"cremainder", torch_cremainder},
{"cbitand", torch_cbitand},
{"cbitor", torch_cbitor},
{"cbitxor", torch_cbitxor},
{"cmod", torch_cmod},
{"addcmul", torch_addcmul},
{"addcdiv", torch_addcdiv},
{"mv", torch_mv},
{"mm", torch_mm},
{"bmm", torch_bmm},
{"ger", torch_ger},
{"addmv", torch_addmv},
{"addmm", torch_addmm},
{"addr", torch_addr},
{"addbmm", torch_addbmm},
{"baddbmm", torch_baddbmm},
{"numel", torch_numel},
{"cumsum", torch_cumsum},
{"cumprod", torch_cumprod},
{"sum", torch_sum},
{"prod", torch_prod},
{"min", torch_min},
{"max", torch_max},
{"cmin", torch_cmin},
{"cmax", torch_cmax},
{"trace", torch_trace},
{"cross", torch_cross},
{"diag", torch_diag},
{"eye", torch_eye},
{"range", torch_range},
{"randperm", torch_randperm},
{"sort", torch_sort},
{"topk", torch_topk},
{"kthvalue", torch_kthvalue},
{"mode", torch_mode},
{"median", torch_median},
{"tril", torch_tril},
{"triu", torch_triu},
{"cat", torch_cat},
{"random", torch_random},
{"geometric", torch_geometric},
{"bernoulli", torch_bernoulli},
{"squeeze", torch_squeeze},
{"sign", torch_sign},
{"conv2", torch_conv2},
{"xcorr2", torch_xcorr2},
{"conv3", torch_conv3},
{"xcorr3", torch_xcorr3},
{"lt", torch_lt},
{"gt", torch_gt},
{"le", torch_le},
{"ge", torch_ge},
{"eq", torch_eq},
{"ne", torch_ne},
{"nonzero", torch_nonzero},
{"all", torch_all},
{"any", torch_any},
{"abs", torch_abs},
{"mean", torch_mean},
{"var", torch_var},
{"std", torch_std},
{"histc", torch_histc},
{"bhistc", torch_bhistc},
{"norm", torch_norm},
{"renorm", torch_renorm},
{"dist", torch_dist},
{"linspace", torch_linspace},
{"logspace", torch_logspace},
{"log", torch_log},
{"log1p", torch_log1p},
{"exp", torch_exp},
{"cos", torch_cos},
{"acos", torch_acos},
{"cosh", torch_cosh},
{"sin", torch_sin},
{"asin", torch_asin},
{"sinh", torch_sinh},
{"tan", torch_tan},
{"atan", torch_atan},
{"tanh", torch_tanh},
{"sqrt", torch_sqrt},
{"round", torch_round},
{"ceil", torch_ceil},
{"floor", torch_floor},
{"trunc", torch_trunc},
{"frac", torch_frac},
{"rsqrt", torch_rsqrt},
{"sigmoid", torch_sigmoid},
{"neg", torch_neg},
{"cinv", torch_cinv},
{"lerp", torch_lerp},
{"atan2", torch_atan2},
{"pow", torch_pow},
{"rand", torch_rand},
{"randn", torch_randn},
{"multinomial", torch_multinomial},
{"uniform", torch_uniform},
{"normal", torch_normal},
{"cauchy", torch_cauchy},
{"logNormal", torch_logNormal},
{"exponential", torch_exponential},
{"gesv", torch_gesv},
{"gels", torch_gels},
{"trtrs", torch_trtrs},
{"symeig", torch_symeig},
{"eig", torch_eig},
{"svd", torch_svd},
{"inverse", torch_inverse},
{"potrf", torch_potrf},
{"potrs", torch_potrs},
{"potri", torch_potri},
{"pstrf", torch_pstrf},
{"qr", torch_qr},
{"geqrf", torch_geqrf},
{"orgqr", torch_orgqr},
{"ormqr", torch_ormqr},
{NULL, NULL}
};

void torch_TensorMath_init(lua_State *L)
{
  torch_ByteTensorMath_init(L);
  torch_CharTensorMath_init(L);
  torch_ShortTensorMath_init(L);
  torch_IntTensorMath_init(L);
  torch_LongTensorMath_init(L);
  torch_FloatTensorMath_init(L);
  torch_DoubleTensorMath_init(L);
  luaT_setfuncs(L, torch_TensorMath__, 0);
}
