浏览代码

julia: Expose more functions from StarPU API.

Pierre Huchant 5 年之前
父节点
当前提交
345073b487
共有 4 个文件被更改,包括 16 次插入1 次删除
  1. 2 0
      julia/src/StarPU.jl
  2. 4 0
      julia/src/data.jl
  3. 8 1
      julia/src/task.jl
  4. 2 0
      julia/src/translate_headers.jl

+ 2 - 0
julia/src/StarPU.jl

@@ -85,6 +85,7 @@ export starpu_data_get_sub_data
 export starpu_data_partition
 export starpu_data_unpartition
 export starpu_data_map_filters
+export starpu_data_wont_use
 export starpu_task_insert
 export starpu_task_wait_for_all
 export starpu_task_submit
@@ -94,6 +95,7 @@ export starpu_task_declare_deps
 export starpu_task_declare_end_deps
 export starpu_task_wait_for_n_submitted
 export starpu_task_destroy
+export starpu_tag_remove
 export starpu_tag_wait
 export starpu_tag_notify_from_apps
 export starpu_iteration_pop

+ 4 - 0
julia/src/data.jl

@@ -160,6 +160,10 @@ function starpu_data_release_on_node(handle :: StarpuDataHandle, node :: Int)
     starpu_data_release_on_node(handle.object, node)
 end
 
+function starpu_data_wont_use(handle :: StarpuDataHandle)
+    starpu_data_wont_use(handle.object)
+end
+
 function repl(x::Symbol)
     return x
 end

+ 8 - 1
julia/src/task.jl

@@ -111,6 +111,7 @@ function starpu_task(;
                      callback :: Union{Cvoid, Function} = nothing,
                      callback_arg = nothing,
                      tag :: Union{Cvoid, starpu_tag_t} = nothing,
+                     tag_only :: Union{Cvoid, starpu_tag_t} = nothing,
                      sequential_consistency = true,
                      detach = 1,
                      color :: Union{Cvoid, UInt32} = nothing,
@@ -167,6 +168,10 @@ function starpu_task(;
         output.c_task.use_tag = 1
     end
 
+    if tag_only != nothing
+        output.c_task.tag_id = tag_only
+    end
+
     if color != nothing
         output.c_task.color = color
     end
@@ -288,6 +293,7 @@ function starpu_task_insert(;
                             callback :: Union{Cvoid, Function} = nothing,
                             callback_arg = nothing,
                             tag :: Union{Cvoid, starpu_tag_t} = nothing,
+                            tag_only :: Union{Cvoid, starpu_tag_t} = nothing,
                             sequential_consistency = true,
                             detach = 1,
                             where :: Union{Cvoid, Int32} = nothing,
@@ -310,7 +316,8 @@ function starpu_task_insert(;
     end
 
     task = starpu_task(cl = cl, handles = handles, cl_arg = cl_arg, callback = callback,
-                       callback_arg = callback_arg, tag = tag, sequential_consistency = sequential_consistency,
+                       callback_arg = callback_arg, tag = tag, tag_only = tag_only,
+                       sequential_consistency = sequential_consistency,
                        detach = detach, color = color, where = where)
 
     starpu_task_submit(task)

+ 2 - 0
julia/src/translate_headers.jl

@@ -63,6 +63,7 @@ function starpu_translate_headers()
                                "starpu_data_set_default_sequential_consistency_flag",
                                "starpu_data_get_sequential_consistency_flag",
                                "starpu_data_set_sequential_consistency_flag",
+                               "starpu_data_wont_use",
                                "starpu_matrix_data_register",
                                "starpu_block_data_register",
                                "starpu_vector_data_register",
@@ -76,6 +77,7 @@ function starpu_translate_headers()
                                "starpu_task_submit",
                                "starpu_task_wait",
                                "starpu_task_wait_for_n_submitted",
+                               "starpu_tag_remove",
                                "starpu_tag_wait",
                                "starpu_tag_declare_deps_array",
                                "starpu_tag_notify_from_apps",