Class: Tensorflow::Long_long

Inherits:
Object
  • Object
show all
Defined in:
ext/Tensorflow_wrap.cxx

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object


14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
# File 'ext/Tensorflow_wrap.cxx', line 14987

SWIGINTERN VALUE
_wrap_new_Long_long(int argc, VALUE *argv, VALUE self) {
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  Long_long *result = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","Long_long", 1, argv[0] ));
  } 
  arg1 = static_cast< size_t >(val1);
  result = (Long_long *)new_Long_long(arg1);
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Class Method Details

.frompointer(*args) ⇒ Object


15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
# File 'ext/Tensorflow_wrap.cxx', line 15130

SWIGINTERN VALUE
_wrap_Long_long_frompointer(int argc, VALUE *argv, VALUE self) {
  long long *arg1 = (long long *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Long_long *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_long_long, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "long long *","Long_long_frompointer", 1, argv[0] )); 
  }
  arg1 = reinterpret_cast< long long * >(argp1);
  result = (Long_long *)Long_long_frompointer(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Long_long, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

Instance Method Details

#[](*args) ⇒ Object

call-seq:

[](index) -> long long

Element accessor/slicing.


15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
# File 'ext/Tensorflow_wrap.cxx', line 15028

SWIGINTERN VALUE
_wrap_Long_long___getitem__(int argc, VALUE *argv, VALUE self) {
  Long_long *arg1 = (Long_long *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  long long result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Long_long, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long_long *","__getitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< Long_long * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__getitem__", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  result = (long long)Long_long___getitem__(arg1,arg2);
  vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
  return vresult;
fail:
  return Qnil;
}

#[]=(*args) ⇒ Object

call-seq:

[]=(index, value)

Element setter/slicing.


15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
# File 'ext/Tensorflow_wrap.cxx', line 15069

SWIGINTERN VALUE
_wrap_Long_long___setitem__(int argc, VALUE *argv, VALUE self) {
  Long_long *arg1 = (Long_long *) 0 ;
  size_t arg2 ;
  long long arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  long long val3 ;
  int ecode3 = 0 ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Long_long, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long_long *","__setitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< Long_long * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__setitem__", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long long","__setitem__", 3, argv[1] ));
  } 
  arg3 = static_cast< long long >(val3);
  Long_long___setitem__(arg1,arg2,arg3);
  return Qnil;
fail:
  return Qnil;
}

#cast(*args) ⇒ Object


15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
# File 'ext/Tensorflow_wrap.cxx', line 15106

SWIGINTERN VALUE
_wrap_Long_long_cast(int argc, VALUE *argv, VALUE self) {
  Long_long *arg1 = (Long_long *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long long *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Long_long, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long_long *","cast", 1, self )); 
  }
  arg1 = reinterpret_cast< Long_long * >(argp1);
  result = (long long *)Long_long_cast(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long_long, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}