63707
63708
63709
63710
63711
63712
63713
63714
63715
63716
63717
63718
63719
63720
63721
63722
63723
63724
63725
63726
63727
63728
63729
63730
63731
63732
63733
63734
63735
63736
63737
63738
63739
63740
63741
63742
63743
63744
63745
63746
63747
63748
63749
63750
63751
63752
63753
63754
63755
63756
63757
63758
63759
63760
63761
63762
63763
63764
63765
63766
63767
63768
63769
63770
63771
63772
63773
63774
63775
63776
63777
63778
63779
63780
63781
63782
63783
63784
63785
63786
63787
63788
63789
63790
63791
63792
63793
63794
63795
63796
63797
63798
63799
63800
63801
63802
63803
63804
63805
63806
63807
63808
63809
63810
63811
63812
63813
63814
63815
63816
63817
63818
63819
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829
63830
63831
63832
63833
63834
63835
63836
63837
63838
63839
63840
63841
63842
63843
63844
63845
63846
63847
63848
|
# File 'ext/cntk/cntk_wrap.cxx', line 63707
SWIGINTERN VALUE
_wrap_QuantizedDistributedCommunicator_quantized_aggregate(int argc, VALUE *argv, VALUE self) {
CNTK::QuantizedDistributedCommunicator *arg1 = (CNTK::QuantizedDistributedCommunicator *) 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg2 = 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg3 = 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg4 = 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg5 = 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg6 = 0 ;
std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > *arg7 = 0 ;
std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > *arg8 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::shared_ptr< CNTK::QuantizedDistributedCommunicator > tempshared1 ;
std::shared_ptr< CNTK::QuantizedDistributedCommunicator > *smartarg1 = 0 ;
int res2 = SWIG_OLDOBJ ;
int res3 = SWIG_OLDOBJ ;
int res4 = SWIG_OLDOBJ ;
void *argp5 = 0 ;
int res5 = 0 ;
void *argp6 = 0 ;
int res6 = 0 ;
void *argp7 = 0 ;
int res7 = 0 ;
int res8 = SWIG_OLDOBJ ;
if ((argc < 7) || (argc > 7)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
}
{
swig_ruby_owntype newmem = {
0, 0
};
res1 = SWIG_ConvertPtrAndOwn(self, &argp1, SWIGTYPE_p_std__shared_ptrT_CNTK__QuantizedDistributedCommunicator_t, 0 | 0 , &newmem);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::QuantizedDistributedCommunicator *","QuantizedAggregate", 1, self ));
}
if (newmem.own & SWIG_CAST_NEW_MEMORY) {
tempshared1 = *reinterpret_cast< std::shared_ptr< CNTK::QuantizedDistributedCommunicator > * >(argp1);
delete reinterpret_cast< std::shared_ptr< CNTK::QuantizedDistributedCommunicator > * >(argp1);
arg1 = const_cast< CNTK::QuantizedDistributedCommunicator * >(tempshared1.get());
} else {
smartarg1 = reinterpret_cast< std::shared_ptr< CNTK::QuantizedDistributedCommunicator > * >(argp1);
arg1 = const_cast< CNTK::QuantizedDistributedCommunicator * >((smartarg1 ? smartarg1->get() : 0));
}
}
{
std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *ptr = (std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *)0;
res2 = swig::asptr(argv[0], &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 2, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 2, argv[0]));
}
arg2 = ptr;
}
{
std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *ptr = (std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *)0;
res3 = swig::asptr(argv[1], &ptr);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 3, argv[1] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 3, argv[1]));
}
arg3 = ptr;
}
{
std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *ptr = (std::vector< std::shared_ptr< CNTK::NDArrayView >,std::allocator< std::shared_ptr< CNTK::NDArrayView > > > *)0;
res4 = swig::asptr(argv[2], &ptr);
if (!SWIG_IsOK(res4)) {
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 4, argv[2] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &","QuantizedAggregate", 4, argv[2]));
}
arg4 = ptr;
}
res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__NDArrayView_t_std__allocatorT_std__shared_ptrT_CNTK__NDArrayView_t_t_t, 0 );
if (!SWIG_IsOK(res5)) {
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 5, argv[3] ));
}
if (!argp5) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 5, argv[3]));
}
arg5 = reinterpret_cast< std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > * >(argp5);
res6 = SWIG_ConvertPtr(argv[4], &argp6, SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__NDArrayView_t_std__allocatorT_std__shared_ptrT_CNTK__NDArrayView_t_t_t, 0 );
if (!SWIG_IsOK(res6)) {
SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 6, argv[4] ));
}
if (!argp6) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 6, argv[4]));
}
arg6 = reinterpret_cast< std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > * >(argp6);
res7 = SWIG_ConvertPtr(argv[5], &argp7, SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__NDArrayView_t_std__allocatorT_std__shared_ptrT_CNTK__NDArrayView_t_t_t, 0 );
if (!SWIG_IsOK(res7)) {
SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 7, argv[5] ));
}
if (!argp7) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > &","QuantizedAggregate", 7, argv[5]));
}
arg7 = reinterpret_cast< std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > * >(argp7);
{
std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > *ptr = (std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > *)0;
res8 = swig::asptr(argv[6], &ptr);
if (!SWIG_IsOK(res8)) {
SWIG_exception_fail(SWIG_ArgError(res8), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > const &","QuantizedAggregate", 8, argv[6] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > const &","QuantizedAggregate", 8, argv[6]));
}
arg8 = ptr;
}
{
try {
(arg1)->QuantizedAggregate((std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &)*arg2,(std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &)*arg3,(std::vector< CNTK::NDArrayViewPtr,std::allocator< CNTK::NDArrayViewPtr > > const &)*arg4,*arg5,*arg6,*arg7,(std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > const &)*arg8);
}
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");
}
}
if (SWIG_IsNewObj(res2)) delete arg2;
if (SWIG_IsNewObj(res3)) delete arg3;
if (SWIG_IsNewObj(res4)) delete arg4;
if (SWIG_IsNewObj(res8)) delete arg8;
return Qnil;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
if (SWIG_IsNewObj(res3)) delete arg3;
if (SWIG_IsNewObj(res4)) delete arg4;
if (SWIG_IsNewObj(res8)) delete arg8;
return Qnil;
}
|