Lib/vc4/Invoke.cpp
/**
 * Initialize launch messages, if not already done so
 *
 * Doing this for max number of QPUs, so that num QPUs can be changed dynamically on calls.
 */
Initialize launch messages, if not already done so
Doing this for max number of QPUs, so that num QPUs can be changed dynamically on calls.
Initialize launch messages if not already done so Doing this for max number of QPUs so that num QPUs can be changed dynamically on calls .
void init_launch_messages(Data &launch_messages, Code const &code, IntList const &params, Data const &uniforms) {
  assertq(!uniforms.empty(), "init_launch_messages(): expecting values for uniforms");
  if (launch_messages.allocated()) return;  
  launch_messages.alloc(2*Platform::max_qpus());
  for (int i = 0; i < Platform::max_qpus(); i++) {
    launch_messages[2*i]     = uniforms.getAddress() + 4*i*num_params(params);  
    launch_messages[2*i + 1] = code.getAddress();
  }
}
void init_launch_messages ( Data & launch_messages , Code const & code , IntList const & params , Data const & uniforms ) { assertq ( ! uniforms . empty ( ) , " " ) ; if ( launch_messages . allocated ( ) ) return ; launch_messages . alloc ( 2 * Platform :: max_qpus ( ) ) ; for ( int i = 0 ; i < Platform :: max_qpus ( ) ; i ++ ) { launch_messages [ 2 * i ] = uniforms . getAddress ( ) + 4 * i * num_params ( params ) ; launch_messages [ 2 * i + 1 ] = code . getAddress ( ) ; } }
Initialize launch messages, if not already done so
 Doing this for max number of QPUs, so that num QPUs can be changed dynamically on calls.
Initialize launch messages if not already done so Doing this for max number of QPUs so that num QPUs can be changed dynamically on calls .
// Already done, don't redo // 4* for uint32_t offset