Class: CNTK::DistributedWorkerDescriptor

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



62892
62893
62894
62895
62896
62897
62898
62899
62900
62901
62902
62903
62904
62905
62906
62907
62908
62909
62910
62911
62912
62913
62914
62915
62916
62917
62918
62919
62920
# File 'ext/cntk/cntk_wrap.cxx', line 62892

SWIGINTERN VALUE
_wrap_new_DistributedWorkerDescriptor(int argc, VALUE *argv, VALUE self) {
  CNTK::DistributedWorkerDescriptor *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try {
      result = (CNTK::DistributedWorkerDescriptor *)new CNTK::DistributedWorkerDescriptor();
      DATA_PTR(self) = result; 
    }
    catch (const std::runtime_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (const std::invalid_argument &e) {
      SWIG_exception(SWIG_ValueError,e.what()); 
    }
    catch (const std::logic_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (...) {
      SWIG_exception(SWIG_UnknownError,"Runtime exception"); 
    }
  }
  return self;
fail:
  return Qnil;
}

Instance Method Details

#==(*args) ⇒ Object

call-seq:

==(other) -> bool

Equality comparison operator.



62826
62827
62828
62829
62830
62831
62832
62833
62834
62835
62836
62837
62838
62839
62840
62841
62842
62843
62844
62845
62846
62847
62848
62849
62850
62851
62852
62853
62854
62855
62856
62857
62858
62859
62860
62861
62862
62863
62864
62865
62866
62867
62868
62869
62870
62871
62872
62873
62874
# File 'ext/cntk/cntk_wrap.cxx', line 62826

SWIGINTERN VALUE
_wrap_DistributedWorkerDescriptor___eq__(int argc, VALUE *argv, VALUE self) {
  CNTK::DistributedWorkerDescriptor *arg1 = (CNTK::DistributedWorkerDescriptor *) 0 ;
  CNTK::DistributedWorkerDescriptor *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool 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_CNTK__DistributedWorkerDescriptor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DistributedWorkerDescriptor *","__eq__", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::DistributedWorkerDescriptor * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__DistributedWorkerDescriptor,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::DistributedWorkerDescriptor const &","__eq__", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::DistributedWorkerDescriptor const &","__eq__", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< CNTK::DistributedWorkerDescriptor * >(argp2);
  {
    try {
      result = (bool)CNTK_DistributedWorkerDescriptor___eq__(arg1,(CNTK::DistributedWorkerDescriptor const &)*arg2); 
    }
    catch (const std::runtime_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (const std::invalid_argument &e) {
      SWIG_exception(SWIG_ValueError,e.what()); 
    }
    catch (const std::logic_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (...) {
      SWIG_exception(SWIG_UnknownError,"Runtime exception"); 
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#is_main(*args) ⇒ Object



62777
62778
62779
62780
62781
62782
62783
62784
62785
62786
62787
62788
62789
62790
62791
62792
62793
62794
62795
62796
62797
62798
62799
62800
62801
62802
62803
62804
62805
62806
62807
62808
62809
62810
62811
62812
62813
62814
# File 'ext/cntk/cntk_wrap.cxx', line 62777

SWIGINTERN VALUE
_wrap_DistributedWorkerDescriptor_is_main(int argc, VALUE *argv, VALUE self) {
  CNTK::DistributedWorkerDescriptor *arg1 = (CNTK::DistributedWorkerDescriptor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool 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_CNTK__DistributedWorkerDescriptor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DistributedWorkerDescriptor *","IsMain", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::DistributedWorkerDescriptor * >(argp1);
  {
    try {
      result = (bool)(arg1)->IsMain(); 
    }
    catch (const std::runtime_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (const std::invalid_argument &e) {
      SWIG_exception(SWIG_ValueError,e.what()); 
    }
    catch (const std::logic_error &e) {
      SWIG_exception(SWIG_RuntimeError,e.what()); 
    }
    catch (...) {
      SWIG_exception(SWIG_UnknownError,"Runtime exception"); 
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#m_global_rank(*args) ⇒ Object



62693
62694
62695
62696
62697
62698
62699
62700
62701
62702
62703
62704
62705
62706
62707
62708
62709
62710
62711
62712
62713
62714
# File 'ext/cntk/cntk_wrap.cxx', line 62693

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

#m_global_rank=(*args) ⇒ Object



62664
62665
62666
62667
62668
62669
62670
62671
62672
62673
62674
62675
62676
62677
62678
62679
62680
62681
62682
62683
62684
62685
62686
62687
62688
62689
62690
# File 'ext/cntk/cntk_wrap.cxx', line 62664

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

#m_host_id(*args) ⇒ Object



62753
62754
62755
62756
62757
62758
62759
62760
62761
62762
62763
62764
62765
62766
62767
62768
62769
62770
62771
62772
62773
62774
# File 'ext/cntk/cntk_wrap.cxx', line 62753

SWIGINTERN VALUE
_wrap_DistributedWorkerDescriptor_m_host_id_get(int argc, VALUE *argv, VALUE self) {
  CNTK::DistributedWorkerDescriptor *arg1 = (CNTK::DistributedWorkerDescriptor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::wstring *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_CNTK__DistributedWorkerDescriptor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DistributedWorkerDescriptor *","m_hostId", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::DistributedWorkerDescriptor * >(argp1);
  result = (std::wstring *) & ((arg1)->m_hostId);
  vresult = SWIG_From_std_wstring(static_cast< std::wstring >(*result));
  return vresult;
fail:
  return Qnil;
}

#m_host_id=(*args) ⇒ Object



62717
62718
62719
62720
62721
62722
62723
62724
62725
62726
62727
62728
62729
62730
62731
62732
62733
62734
62735
62736
62737
62738
62739
62740
62741
62742
62743
62744
62745
62746
62747
62748
62749
62750
# File 'ext/cntk/cntk_wrap.cxx', line 62717

SWIGINTERN VALUE
_wrap_DistributedWorkerDescriptor_m_host_id_set(int argc, VALUE *argv, VALUE self) {
  CNTK::DistributedWorkerDescriptor *arg1 = (CNTK::DistributedWorkerDescriptor *) 0 ;
  std::wstring *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  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_CNTK__DistributedWorkerDescriptor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DistributedWorkerDescriptor *","m_hostId", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::DistributedWorkerDescriptor * >(argp1);
  {
    std::wstring *ptr = (std::wstring *)0;
    res2 = SWIG_AsPtr_std_wstring(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::wstring const &","m_hostId", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","m_hostId", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  if (arg1) (arg1)->m_hostId = *arg2;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
}