Class: Tensorflow::TF_Buffer

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object


13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
# File 'ext/Tensorflow_wrap.cxx', line 13625

SWIGINTERN VALUE
_wrap_new_TF_Buffer(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (TF_Buffer *)new TF_Buffer();
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Instance Method Details

#data(*args) ⇒ Object


13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
# File 'ext/Tensorflow_wrap.cxx', line 13463

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

#data=(*args) ⇒ Object


13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
# File 'ext/Tensorflow_wrap.cxx', line 13436

SWIGINTERN VALUE
_wrap_TF_Buffer_data_set(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *arg1 = (TF_Buffer *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  
  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_TF_Buffer, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TF_Buffer *","data", 1, self )); 
  }
  arg1 = reinterpret_cast< TF_Buffer * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void const *","data", 2, argv[0] )); 
  }
  if (arg1) (arg1)->data = (void const *)arg2;
  return Qnil;
fail:
  return Qnil;
}

#data_deallocator(*args) ⇒ Object


13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
# File 'ext/Tensorflow_wrap.cxx', line 13586

SWIGINTERN VALUE
_wrap_TF_Buffer_data_deallocator_get(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *arg1 = (TF_Buffer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void (*result)(void *,size_t) = 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_TF_Buffer, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TF_Buffer *","data_deallocator", 1, self )); 
  }
  arg1 = reinterpret_cast< TF_Buffer * >(argp1);
  result = (void (*)(void *,size_t)) ((arg1)->data_deallocator);
  vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_size_t__void);
  return vresult;
fail:
  return Qnil;
}

#data_deallocator=(*args) ⇒ Object


13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
# File 'ext/Tensorflow_wrap.cxx', line 13558

SWIGINTERN VALUE
_wrap_TF_Buffer_data_deallocator_set(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *arg1 = (TF_Buffer *) 0 ;
  void (*arg2)(void *,size_t) = (void (*)(void *,size_t)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  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_TF_Buffer, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TF_Buffer *","data_deallocator", 1, self )); 
  }
  arg1 = reinterpret_cast< TF_Buffer * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void_size_t__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void *,size_t)","data_deallocator", 2, argv[0] )); 
    }
  }
  if (arg1) (arg1)->data_deallocator = arg2;
  return Qnil;
fail:
  return Qnil;
}

#length(*args) ⇒ Object

call-seq:

length -> size_t

Size or Length of the TF_Buffer.


13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
# File 'ext/Tensorflow_wrap.cxx', line 13534

SWIGINTERN VALUE
_wrap_TF_Buffer_length_get(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *arg1 = (TF_Buffer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  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_TF_Buffer, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TF_Buffer *","length", 1, self )); 
  }
  arg1 = reinterpret_cast< TF_Buffer * >(argp1);
  result =  ((arg1)->length);
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}

#length=(*args) ⇒ Object

call-seq:

length=(x) -> size_t

Size or Length of the TF_Buffer.


13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
# File 'ext/Tensorflow_wrap.cxx', line 13505

SWIGINTERN VALUE
_wrap_TF_Buffer_length_set(int argc, VALUE *argv, VALUE self) {
  TF_Buffer *arg1 = (TF_Buffer *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  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_TF_Buffer, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TF_Buffer *","length", 1, self )); 
  }
  arg1 = reinterpret_cast< TF_Buffer * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","length", 2, argv[0] ));
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->length = arg2;
  return Qnil;
fail:
  return Qnil;
}