소스 검색

dyn_modes always has to be used when nbuffers is greater than MAX anyway, not only when using variable nbuffers

Samuel Thibault 10 년 전
부모
커밋
352ab87916
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      src/util/starpu_task_insert_utils.c

+ 3 - 6
src/util/starpu_task_insert_utils.c

@@ -193,13 +193,10 @@ void _starpu_task_insert_check_nb_buffers(struct starpu_codelet *cl, struct star
 			{
 				(*task)->dyn_handles[i] = (*task)->handles[i];
 			}
-			if ((*task)->cl->nbuffers == STARPU_VARIABLE_NBUFFERS)
+			(*task)->dyn_modes = malloc(*allocated_buffers * sizeof(enum starpu_data_access_mode));
+			for(i=0 ; i<current_buffer ; i++)
 			{
-				(*task)->dyn_modes = malloc(*allocated_buffers * sizeof(enum starpu_data_access_mode));
-				for(i=0 ; i<current_buffer ; i++)
-				{
-					(*task)->dyn_modes[i] = (*task)->modes[i];
-				}
+				(*task)->dyn_modes[i] = (*task)->modes[i];
 			}
 		}
 		else if (current_buffer >= *allocated_buffers)