Class: Tensorflow::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


15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
# File 'ext/Tensorflow_wrap.cxx', line 15171

SWIGINTERN VALUE
_wrap_new_Long(int argc, VALUE *argv, VALUE self) {
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  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", 1, argv[0] ));
  } 
  arg1 = static_cast< size_t >(val1);
  result = (Long *)new_Long(arg1);
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Class Method Details

.frompointer(*args) ⇒ Object


15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
# File 'ext/Tensorflow_wrap.cxx', line 15314

SWIGINTERN VALUE
_wrap_Long_frompointer(int argc, VALUE *argv, VALUE self) {
  long *arg1 = (long *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  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, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "long *","Long_frompointer", 1, argv[0] )); 
  }
  arg1 = reinterpret_cast< long * >(argp1);
  result = (Long *)Long_frompointer(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Long, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

Instance Method Details

#[](*args) ⇒ Object

call-seq:

[](index) -> long

Element accessor/slicing.


15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
# File 'ext/Tensorflow_wrap.cxx', line 15212

SWIGINTERN VALUE
_wrap_Long___getitem__(int argc, VALUE *argv, VALUE self) {
  Long *arg1 = (Long *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  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, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long *","__getitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< 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___getitem__(arg1,arg2);
  vresult = SWIG_From_long(static_cast< long >(result));
  return vresult;
fail:
  return Qnil;
}

#[]=(*args) ⇒ Object

call-seq:

[]=(index, value)

Element setter/slicing.


15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
# File 'ext/Tensorflow_wrap.cxx', line 15253

SWIGINTERN VALUE
_wrap_Long___setitem__(int argc, VALUE *argv, VALUE self) {
  Long *arg1 = (Long *) 0 ;
  size_t arg2 ;
  long arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  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, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long *","__setitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< 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(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","__setitem__", 3, argv[1] ));
  } 
  arg3 = static_cast< long >(val3);
  Long___setitem__(arg1,arg2,arg3);
  return Qnil;
fail:
  return Qnil;
}

#cast(*args) ⇒ Object


15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
# File 'ext/Tensorflow_wrap.cxx', line 15290

SWIGINTERN VALUE
_wrap_Long_cast(int argc, VALUE *argv, VALUE self) {
  Long *arg1 = (Long *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  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, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Long *","cast", 1, self )); 
  }
  arg1 = reinterpret_cast< Long * >(argp1);
  result = (long *)Long_cast(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}