source/train/XWorkerBroadcast.cpp
void XWorkerBroadcast::Broadcast(XList * args)
{
    int paramCount = 0;

    XWorkerBroadcast * broadcaster = (XWorkerBroadcast*)args->GetItem(paramCount++);
    XTensorKeeper * source = (XTensorKeeper*)args->GetItem(paramCount++);

    /* target models */
    int targetNum = args->GetItemInt(paramCount++);
    XList target;
    for (int i = 0; i < targetNum; i++) {
        XTensorKeeper * model = (XTensorKeeper*)args->GetItem(paramCount++);
        target.Add(model);
    }

    broadcaster->BroadcastData(source, &target);
}
/* 
wrapper of BroadcastDataSingle 
>> args - the list of arguments
*/
wrapper of BroadcastDataSingle
>> args - the list of arguments
wrapper of BroadcastDataSingle >> args - the list of arguments
void XWorkerBroadcast::Broadcast(XList * args)
{
    int paramCount = 0;
    XWorkerBroadcast * broadcaster = (XWorkerBroadcast*)args->GetItem(paramCount++);
    XTensorKeeper * source = (XTensorKeeper*)args->GetItem(paramCount++);
    int targetNum = args->GetItemInt(paramCount++);
    XList target;
    for (int i = 0; i < targetNum; i++) {
        XTensorKeeper * model = (XTensorKeeper*)args->GetItem(paramCount++);
        target.Add(model);
    }
    broadcaster->BroadcastData(source, &target);
}
void XWorkerBroadcast :: Broadcast ( XList * args ) { int paramCount = 0 ; XWorkerBroadcast * broadcaster = ( XWorkerBroadcast * ) args -> GetItem ( paramCount ++ ) ; XTensorKeeper * source = ( XTensorKeeper * ) args -> GetItem ( paramCount ++ ) ; int targetNum = args -> GetItemInt ( paramCount ++ ) ; XList target ; for ( int i = 0 ; i < targetNum ; i ++ ) { XTensorKeeper * model = ( XTensorKeeper * ) args -> GetItem ( paramCount ++ ) ; target . Add ( model ) ; } broadcaster -> BroadcastData ( source , & target ) ; }
wrapper of BroadcastDataSingle
>> args - the list of arguments
wrapper of BroadcastDataSingle >> args - the list of arguments
/* target models */