static void create_task_22(starpu_data_handle_t dataA, unsigned k, unsigned i, unsigned j) { int ret; /* printf("task 22 k,i,j = %d,%d,%d TAG = %llx\n", k,i,j, TAG22(k,i,j)); */ struct starpu_task *task = create_task(TAG22(k, i, j)); task->cl = &cl22; /* which sub-data is manipulated ? */ task->handles[0] = starpu_data_get_sub_data(dataA, 2, i, k); task->handles[1] = starpu_data_get_sub_data(dataA, 2, k, j); task->handles[2] = starpu_data_get_sub_data(dataA, 2, i, j); if (!no_prio && (i == k + 1) && (j == k +1) ) { task->priority = STARPU_MAX_PRIO; } /* enforce dependencies ... */ if (k > 0) { starpu_tag_declare_deps(TAG22(k, i, j), 3, TAG22(k-1, i, j), TAG12(k, i), TAG21(k, j)); } else { starpu_tag_declare_deps(TAG22(k, i, j), 2, TAG12(k, i), TAG21(k, j)); } ret = starpu_task_submit(task); STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit"); }
static struct starpu_task * create_task_11(starpu_data_handle_t dataA, unsigned k) { /* FPRINTF(stdout, "task 11 k = %d TAG = %llx\n", k, (TAG11(k))); */ struct starpu_task *task = create_task(TAG11(k)); task->cl = &cl11; /* which sub-data is manipulated ? */ task->handles[0] = starpu_data_get_sub_data(dataA, 2, k, k); /* this is an important task */ if (!noprio) task->priority = STARPU_MAX_PRIO; /* enforce dependencies ... */ if (k > 0) { starpu_tag_declare_deps(TAG11(k), 1, TAG22(k-1, k, k)); } int n = starpu_matrix_get_nx(task->handles[0]); task->flops = FLOPS_SPOTRF(n); return task; }
static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j) { int ret; struct starpu_task *task = create_task(TAG21(k, j)); task->cl = &cl21; /* which sub-data is manipulated ? */ task->handles[0] = starpu_data_get_sub_data(dataA, 2, k, k); task->handles[1] = starpu_data_get_sub_data(dataA, 2, k, j); if (!no_prio && (j == k+1)) { task->priority = STARPU_MAX_PRIO; } /* enforce dependencies ... */ if (k > 0) { starpu_tag_declare_deps(TAG21(k, j), 2, TAG11(k), TAG22(k-1, k, j)); } else { starpu_tag_declare_deps(TAG21(k, j), 1, TAG11(k)); } ret = starpu_task_submit(task); STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit"); }
static void create_task_22(starpu_data_handle_t dataA, unsigned k, unsigned i, unsigned j) { /* FPRINTF(stdout, "task 22 k,i,j = %d,%d,%d TAG = %llx\n", k,i,j, TAG22(k,i,j)); */ struct starpu_task *task = create_task(TAG22(k, i, j)); task->cl = &cl22; /* which sub-data is manipulated ? */ task->handles[0] = starpu_data_get_sub_data(dataA, 2, k, i); task->handles[1] = starpu_data_get_sub_data(dataA, 2, k, j); task->handles[2] = starpu_data_get_sub_data(dataA, 2, i, j); if (!noprio && (i == k + 1) && (j == k +1) ) { task->priority = STARPU_MAX_PRIO; } /* enforce dependencies ... */ if (k > 0) { starpu_tag_declare_deps(TAG22(k, i, j), 3, TAG22(k-1, i, j), TAG21(k, i), TAG21(k, j)); } else { starpu_tag_declare_deps(TAG22(k, i, j), 2, TAG21(k, i), TAG21(k, j)); } int n = starpu_matrix_get_nx(task->handles[0]); task->flops = FLOPS_SGEMM(n, n, n); int ret = starpu_task_submit(task); if (STARPU_UNLIKELY(ret == -ENODEV)) { FPRINTF(stderr, "No worker may execute this task\n"); exit(0); } }
static int create_task_22(starpu_data_handle_t dataA, unsigned k, unsigned i, unsigned j) { int ret; struct starpu_task *task = starpu_task_create(); task->cl = &cl22; /* which sub-data is manipulated ? */ task->handles[0] = starpu_data_get_sub_data(dataA, 2, k, i); task->handles[1] = starpu_data_get_sub_data(dataA, 2, j, k); task->handles[2] = starpu_data_get_sub_data(dataA, 2, j, i); task->tag_id = TAG22(k,i,j); if (!no_prio && (i == k + 1) && (j == k +1) ) task->priority = STARPU_MAX_PRIO; ret = starpu_task_submit(task); if (ret != -ENODEV) STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit"); return ret; }