CBinaryLabels* CMultitaskCompositeMachine::apply_locked_binary(SGVector<index_t> indices) { int n_tasks = m_task_group->get_num_tasks(); SGVector<float64_t> result(indices.vlen); result.zero(); for (int32_t i=0; i<indices.vlen; i++) { for (int32_t j=0; j<n_tasks; j++) { if (m_tasks_indices[j].count(indices[i])) { set_current_task(j); result[i] = apply_one(indices[i]); break; } } } return new CBinaryLabels(result); }
static void apply( const Input& in, std::string& s ) { assert( in.size() == 1 ); s += apply_one( in, static_cast< const T* >( nullptr ) ); }
static void apply( const Input& in, State& st ) { assert( in.size() == 1 ); st.unescaped += apply_one( *in.begin(), static_cast< const T* >( nullptr ) ); }