Skip to content

Commit

Permalink
Fixed task group SLEP ind manage routine
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Jun 28, 2012
1 parent e80c646 commit a1b9e16
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/shogun/transfer/multitask/TaskGroup.cpp
Expand Up @@ -40,21 +40,21 @@ SGVector<index_t> CTaskGroup::get_SLEP_ind()
{
check_task_list(m_tasks);
int32_t n_subtasks = m_tasks->get_num_elements();
SG_PRINT("Number of subtasks = %d\n", n_subtasks);
SGVector<index_t> ind(n_subtasks+1);

CTask* iter_task = (CTask*)(m_tasks->get_first_element());
CTask* iterator = (CTask*)(m_tasks->get_first_element());
ind[0] = 0;
for (int32_t i=0; i<n_subtasks; i++)
int32_t i = 0;
do
{
SG_UNREF(iter_task);
iter_task = (CTask*)(m_tasks->get_next_element());

ind[i+1] = iter_task->get_max_index();
ind[i+1] = iterator->get_max_index();
SG_UNREF(iterator);
i++;
}
while ((iterator = (CTask*)m_tasks->get_next_element()) != NULL);

#ifdef DEBUG_SLEP
ind.display_vector();
#endif

return ind;
}

0 comments on commit a1b9e16

Please sign in to comment.